Skip to content

Umbrella PRs assistant - #14763

Draft
ArmandPhilippot wants to merge 10 commits into
mainfrom
armand/release-queue
Draft

ArmandPhilippot wants to merge 10 commits into
mainfrom
armand/release-queue

Conversation

@ArmandPhilippot

@ArmandPhilippot ArmandPhilippot commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

(I know the diff is big so... FYI, without the tests, this is ~2,750 new lines including doc comments)

Description (required)

Automates our release umbrella PRs. When a maintainer adds the new accepted label to a docs PR, a bot routes it to the umbrella PR of its release (release-queue/<base>), squash-merges it there, and keeps the umbrella PR up to date.

The workflow runs in dry run mode at the moment: it only comments with the umbrella a PR would join, or why it wouldn't.

Going live will be a separate PR to update MODE (after this being reviewed/merged, then tested in the repo) and the CONTRIBUTING.md guide.

What the bot does outside a dry run:

  • Join: patch-release and minor-release route to the main umbrella, major-release to the umbrella of a prerelease branch. The bot creates the umbrella branch and PR on the first join, changes the docs PR base, merges it, and comments with the umbrella it joined.
  • Refuse: when the label and base disagree, approval or required checks are missing, or the PR conflicts with the umbrella, it removes accepted and comments with the reason and how to fix it.
  • Refresh: after each join, it updates the umbrella title ([ci] release astro@<version> docs), its labels (merge-on-release and the release label), and its description: the [ci] release PR it ships with and the docs PRs it includes. A prerelease umbrella links the alpha or beta release PR of next, or the release PR of main once next left prerelease mode. Running the workflow manually refreshes all open umbrellas.
  • Block: the bot requests changes on the umbrella PR, with a checklist to go through before merging: the release PR is merged, no PR still targets the umbrella branch, and the Lunaria directive is in the commit body when translations changed. A maintainer dismisses the review to merge. If more PRs join after that, the bot requests changes again.
  • Settle: once the [ci] release PR an umbrella ships with is merged, the main umbrella keeps its title and label until we merge it, and docs PRs for the next release are refused until then. A PR that documents the release just published can still join by targeting release-queue/main.

The workflow runs scripts/release-queue.ts from main, with Node.js only, and never checks out PR code. Runs are queued one at a time, as joins update the same umbrella PR.

The code lives in scripts/lib/release-queue/:

  • main.ts, cli.ts, config.ts, modes.ts: the entry point and the settings.
  • accepted/: the flow of a PR labeled accepted (routing, readiness, join, comments).
  • umbrella/: the umbrella PRs (body, title and labels, refresh, merge-block review).
  • release/: the release PRs of withastro/astro.
  • github/: a small REST client, with no knowledge of the rest.

To try it on any PR without writing anything:

GITHUB_TOKEN=$(gh auth token) node --experimental-transform-types ./scripts/release-queue.ts --pr <number>

To see what a manual run would change, use --refresh instead of --pr, with MODE=all before the command.

Unit tests can be run locally with pnpm test:release-queue.

Still to do before review: another cleanup pass, and a test run on a fork.

References

@ArmandPhilippot ArmandPhilippot changed the title Add release queue workflow in dry run mode Umbrella PRs assistant Oct 21, 2026
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Preview deployment

✅ Deployment complete!

- Bind the GitHub clients to their repository
- Gather the configuration in one module
- Split out the API types
- Split the umbrella module by purpose
- Move the entry point logic to a testable `runReleaseQueue()`
- Rename generic names
- Derive types from constants
- Remove test-only exports
- Complete doc comments
- Anchor the release marker to the end of the umbrella body
- List the included PRs from the squash commit titles
- Require a sender in GitHub Actions
- Keep refreshing the other umbrellas when one fails
- Name the request of a malformed JSON answer.
- Name the stable branch after its role
- Document return values and errors in tags
- Type the test fixtures.
- List the umbrella's PRs by number because GitHub already shows their
titles
- Read only the numbers from the squash commits
- Split the umbrella title and release label
- Derive the release labels from their types
- Extract the long refusal descriptions
- Reword some doc comments

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant