Introducing a new way to review your PRs.

Read the announcement

imputnet / helium

Private, fast, and honest web browser

View on GitHub

17 documents · Updated Nov 23, 2026

docs / github-workflow-automation

GitHub workflow automation

GitHub workflow automation provides the repository's checks and routine maintenance around code changes. It validates utility code and generated data, checks Chromium source integration, keeps translation review connected to pull requests, creates releases from version changes, and reduces manual repository upkeep. It sits below release, versioning, and automation and connects with developer quality tooling, localization management, and platform patch maintenance.

Automation model

The automation uses GitHub Actions for event-driven work and composite actions for shared setup. Pull requests and pushes receive read-only validation where possible. Workflows that change GitHub data request write access only for the specific review, release, or maintenance task.

The main paths are:

flowchart LR
    Change[Push or pull request] --> Checks[Code and patch checks]
    Change --> I18n[Translation change]
    Main[Push to main] --> Version[Version comparison]
    Schedule[Daily schedule] --> Hygiene[Stale issue and PR review]
    Checks --> Result[Validation result]
    I18n --> Review[Owner review request]
    Version --> Release[Release and tag]
    Hygiene --> Cleanup[Stale item closure]

Validation workflows

The validation workflows protect different parts of the change process. ci.yml checks utility code, repository configuration, and the assembled Chromium source tree. lint.yml checks patch-series rules and translation data. Together, these jobs catch both ordinary code errors and drift in the source and translation inputs used to build Helium.

The code checks share a Python environment through ci-setup. The workflow runs on pull requests, branch pushes, and manual requests. It cancels an older run for the same workflow and ref when a newer run starts. The source check retrieves or rebuilds a Chromium source archive, applies the patch set, and compares generated source lists with the checked-in lists. This makes a change fail when the repository's recorded source view no longer matches its inputs. The workflow also keeps download and generated-list data in separate caches so source retrieval and list validation can be reused without treating checked-in lists as generated truth.

References: .github/…/ci.yml• L3-18 .github/…/ci.yml• L19-150 .github/…/lint.yml• L1-33 .github/…/action.yml• L1-23

Translation review notifications

The translation notification workflow connects changed translation files to the people listed for their language. It runs only when files under i18n/translations/ change, only in the upstream repository for pull requests from the same repository, and avoids duplicate comments or comments marked with i18n-no-notify.

For an eligible pull request, the workflow sends changed JSON paths to i18n_notify.py. That helper maps each language file to its owners in i18n/owners.yml and produces one review comment with the distinct owner mentions. The workflow therefore adds review routing without making translation owners part of the code-check path.

References: .github/…/i18n-notify.yml• L1-47 .github/…/i18n_notify.py• L1-32 i18n/owners.yml• L1-95

Release creation

The release workflow watches pushes to main and turns a version change into a GitHub release. It compares the version before and after the push, then uses the new version as both the release tag and release name. The release body records the commits since the prior version.

No release is created when the computed version stays the same. This keeps normal merges separate from release events and makes the version files the source of the release decision.

References: .github/…/release-and-tag.yml• L1-52 utils/helium_version.py• L38-73

Repository hygiene

The stale-item workflow performs a scheduled review of issues and pull requests that need more information. It marks matching items as stale after 30 days without activity and closes them after a further seven days. Milestones exempt an item from this process, which preserves tracked work that has an explicit schedule.

References: .github/…/stale.yml• L1-22

Shared actions

Composite actions package repeated work so that workflows use the same environment and the same platform-update path. They are local actions, so a change to one can affect every workflow or external workflow that calls it.

CI environment

The CI setup action creates the common runner environment for the main validation jobs. It selects the Python version from .python-version, uses .requirements.txt for pip caching and dependency installation, and installs the system tools needed for source and patch checks.

This action keeps environment drift out of individual jobs. Changes to the Python version or dependency set can therefore change the behavior of all jobs that use the shared setup.

References: .github/…/action.yml• L1-23 .python-version• L1 .requirements.txt• L1-10 .github/…/ci.yml• L19-72

Platform revision updates

The platform bump action refreshes a platform's Chromium base and prepares a pull request for the resulting revision. It updates the upstream submodule, compares the Helium version before and after that update, and either resets or increments the platform revision. It then rebuilds the source view, reapplies the upstream and platform patch layers, and opens an update branch when there is a change to publish.

The action treats the version parts as a contract. A change in the main version resets the platform revision. A platform-only update increments that revision. This preserves a distinct release identity for platform maintenance while allowing the generated patch state to move with upstream.

References: .github/…/action.yml• L1-119 utils/helium_version.py• L49-73

Automation contracts

The workflows rely on a small set of contracts between GitHub events, repository data, and generated results. These contracts are more important than any single job because a silent mismatch can produce a valid-looking pull request or release with the wrong review or source state.

Event and permission boundaries

Each workflow declares the event that starts it and the GitHub permission it needs. Validation uses repository read access. Translation notifications need pull-request write access. Release creation needs contents write access. Stale-item cleanup needs write access for issues and pull requests.

The repository and fork guard in the translation workflow is part of this boundary. It prevents pull requests from outside the upstream repository from using the repository's write token to post comments.

References: .github/…/ci.yml• L3-18 .github/…/i18n-notify.yml• L3-19 .github/…/release-and-tag.yml• L3-7 .github/…/stale.yml• L3-9

Version and source consistency

Release tagging and platform updates depend on the same version model. The version is assembled from the repository's major, Chromium, and revision values, with an optional platform revision for platform-tree work. Source validation follows the repository's download, patch, and generated-list inputs so that a checked-in source description stays aligned with the source tree it represents.

The source workflow also treats the checked-in source lists as reviewable contracts. Its cache key uses the inputs that should change generated output, while the checked-in lists remain outside that key. A list edit therefore still compares against the prior generated result instead of making the cache accept the edit as proof.

References: utils/helium_version.py• L14-16 utils/helium_version.py• L49-73 .github/…/ci.yml• L74-150 .github/…/action.yml• L45-100

Change checklist

When these files or sections are changed, remember to consider these:

  • When .python-version or .requirements.txt changes, check the shared CI setup and every job that depends on its Python tools.
  • When version inputs or helium_version.py change, check both release tag creation and platform revision comparison.
  • When translation file names or i18n/owners.yml change, check the path filter and the language-to-owner mapping used in notification comments.
  • When source download, patch, or generated-list inputs change, check the cache keys and the source-list comparison in ci.yml.
  • When workflow permissions or repository and fork conditions change, check that write tokens remain limited to trusted contexts and required GitHub resources.
  • When the composite platform action changes, check the branch, revision, patch refresh, and pull-request contract used by its caller.

Important failure modes

TriggerConsequenceGuard
A Python version or pinned dependency changes without the shared setup staying alignedCI jobs can use different tools or fail before they reach their checksci-setup reads .python-version and .requirements.txt for all main CI jobs
Generated source lists differ from the checked-in listsThe source integration check fails because the recorded source policy is staleci.yml regenerates the lists and compares both outputs with diff
A translation owner mapping or translation path does not match the notification parser's language ruleThe pull request gets no owner mention or the wrong review groupThe workflow filters translation paths and the helper resolves owners from the JSON filename
The version before and after a push differs unexpectedlyA release can receive the wrong tag or a platform revision can reset when it should incrementBoth workflows compute versions through helium_version.py
A release push lacks the expected prior commit rangeRelease detection cannot compare the old and new version reliablyThe release checkout uses full history before it evaluates the push
A pull request comes from outside the upstream repository and reaches the notification jobA repository write token could be exposed to untrusted workflow codeThe notification job requires the upstream repository and a same-repository pull request
A source input changes but the generated-list cache key does not changeCI can reuse lists from an unrelated source state and miss a required regenerationThe cache key includes the Python, Chromium, download, dependency, rule, and generator inputs

Key files

FileWhy to read it
.github/…/ci.ymlShows the main validation path from checkout through utility checks, configuration checks, source assembly, and generated-list validation.
.github/…/lint.ymlShows the separate patch-series and translation-data checks.
.github/…/action.ymlDefines the shared runner environment for the main CI jobs.
.github/…/action.ymlDefines the automated platform refresh and pull-request path.
.github/…/i18n-notify.ymlShows when translation owners receive review requests and which repository and fork safety gates apply.
.github/…/i18n_notify.pyDefines how changed translation files become owner mentions.
.github/…/release-and-tag.ymlShows how a main-branch version change becomes a tagged release.
.github/…/stale.ymlDefines the scheduled issue and pull-request cleanup policy.
utils/helium_version.pyDefines the version values shared by release and platform automation.
i18n/owners.ymlProvides the language-to-owner data used by translation notifications.