Auto-merge package PRs that are trusted to build (#867)
A package PR approved to build, by its author being trusted or by the build-approved label, sat open after going green until someone merged it by hand, so nothing it built was published. Enable GitHub's auto-merge on it with PKGS_BOT_TOKEN, so the merge lands once the required checks pass and starts publish.yml. The trust rule is build-pr.yml's. Only PRs changing nothing outside pkgbuilds/ qualify: a PR's own tooling never runs in its build, and after merge it runs with the publish secrets. The upstream sync, which labels its own PRs, stays on the reviewed lane. Removing build-approved withdraws the auto-merge.
This commit is contained in:
1 parent
7d2c7c50af
commit
48d6217ff7
4 files changed
+235
No files matched your search
@@ -920,6 +920,17 @@ the push that opens the PR. A push to an `auto/sync-*` branch does not cancel
|
||||
the PR's in-flight build: the new build waits for it and then reuses its
|
||||
artifacts, so a long aarch64 build is not restarted by every sync.
|
||||
|
||||
Package PRs that are trusted to build also merge themselves.
|
||||
`auto-merge-pr.yml` enables auto-merge (with `PKGS_BOT_TOKEN`, so the merge
|
||||
publishes) on any open, non-draft PR whose author is a collaborator, vouched,
|
||||
or a bot, or that carries **`build-approved`**, and that changes nothing
|
||||
outside `pkgbuilds/`. The PR lands once `result`, `self-tests` and
|
||||
`build-isolation` pass; a red build stays open. PRs that also touch
|
||||
workflows, scripts or build tooling still need a maintainer to merge, as does
|
||||
the upstream sync (`auto/sync-upstream`), which labels itself. Removing
|
||||
`build-approved` withdraws the auto-merge it armed. For a PR opened before
|
||||
the workflow existed, run it by hand: `gh workflow run auto-merge-pr.yml -f pr=<number>`.
|
||||
|
||||
To approve builds for an unvouched contributor's PR, apply **`build-approved`**.
|
||||
Until approval, the PR shows **Awaiting build approval** and its required
|
||||
`result` check stays pending, keeping the PR blocked from merging without
|
||||
|
||||
Reference in new issue
Block a user