Skip to content

feat(ci): reusable auto-merge-on-green workflow#16

Open
noahgift wants to merge 2 commits into
mainfrom
feat/auto-merge-on-green
Open

feat(ci): reusable auto-merge-on-green workflow#16
noahgift wants to merge 2 commits into
mainfrom
feat/auto-merge-on-green

Conversation

@noahgift
Copy link
Copy Markdown
Contributor

Summary

  • New reusable workflow .github/workflows/auto-merge.yml that enables GitHub's built-in squash auto-merge on authorized PRs.
  • Once all required status checks pass (org ruleset Green Main requires context gate), GitHub merges automatically — no manual click.
  • Escape hatches: draft PRs are ignored; hold and do-not-merge labels skip the job.

Why

Every PR today requires a manual merge click even when CI is green, pr-gate authorized the author, and the ruleset is satisfied. This workflow makes "CI green → merge" the fleet default, with explicit opt-outs when a human wants to hold the PR.

Rollout plan (not in this PR — will be proposed per-repo afterwards)

Each repo's ci.yml gains an auto-merge job after authorize:
```yaml
jobs:
authorize:
uses: paiml/.github/.github/workflows/pr-gate.yml@main
auto-merge:
needs: authorize
uses: paiml/.github/.github/workflows/auto-merge.yml@main
```
Prerequisite per repo: `allow_auto_merge: true` in repo settings (infra already has this; fleet sweep needed).

Test plan

  • Merge this PR (manual — auto-merge isn't wired into paiml/.github's own ci.yml yet)
  • Wire auto-merge.yml into one pilot repo's ci.yml (suggest: copia or bashrs)
  • Verify that a pilot PR with green checks auto-merges without manual intervention
  • Verify escape hatches: draft PR, hold label, do-not-merge label all suppress
  • Roll out to remaining fleet repos once pilot is stable

🤖 Generated with Claude Code

noahgift and others added 2 commits April 18, 2026 14:18
New workflow `auto-merge.yml` enables GitHub's built-in auto-merge (squash)
on authorized PRs. Once all required status checks (org ruleset `gate`) pass,
GitHub merges automatically — no manual click required.

Escape hatches: draft PRs, `hold` label, `do-not-merge` label.

Intended rollout: add `auto-merge` job to each repo's ci.yml (after
`authorize`). Prerequisite per repo: `allow_auto_merge: true` in settings.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Bundles three bootstrap changes so this PR can flow through its own new
gate (no admin bypass needed):

1. New .github/workflows/ci.yml — runs actionlint + yamllint on every PR,
   produces the 'gate' status check required by org ruleset 13878864
   ('Green Main'). Previously PRs to this repo had no checks and got
   mergeStateStatus=BLOCKED by default.

2. Rolls sovereign-ci.yml container digest from
     sha256:c23c4533…  ->  sha256:dd219db7…
   corresponding to the sovereign-ci:stable image rebuilt on mac-server
   after bumping the base to rust:1.95-slim-bookworm.

3. Together with the already-proposed auto-merge.yml (previous commit),
   this establishes the pattern: CI green -> ruleset satisfied ->
   auto-merge fires.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant