Skip to content

chore(ci): introduce automerge-gate to aggregate path-filtered checks#121

Merged
wadackel merged 1 commit into
mainfrom
chore/gha-2
May 16, 2026
Merged

chore(ci): introduce automerge-gate to aggregate path-filtered checks#121
wadackel merged 1 commit into
mainfrom
chore/gha-2

Conversation

@wadackel
Copy link
Copy Markdown
Collaborator

Summary

  • Add .github/workflows/automerge-gate.yaml using pkgdeps/automerge-gate@v4.1.0 (SHA-pinned) in public mode so the gate's own check_run is the single required status.
  • Filter dogfood and publish via ignore-checksdogfood is skipped on PR events and publish only runs on main-push, so they should not contribute to the aggregated verdict.
  • Public mode is preferred over the README's private-mode example because this repo allows manual self-merges (no review-required ruleset). In private mode the gate stays unposted unless auto-merge or an approving review fires, which would block manual merges. Public mode keeps the gate always-running and fork-friendly.

Why

Currently the branch ruleset requires only build_and_test + commitlint, so actionlint (path-filtered to .github/**) is not required. If actionlint runs and fails, auto-merge still proceeds; if we add it to required, PRs that don't touch .github/** would block forever waiting on a check that never runs. The gate solves both: it waits only for checks that actually ran.

Follow-up (operational, NOT in this PR)

After this PR merges, swap the branch ruleset's required status checks from build_and_test + commitlint to a single all-passed entry:

gh api repos/knowledge-work/command-action/rulesets/1512870 \
  --jq '.rules[] | select(.type=="required_status_checks") | .parameters.required_status_checks'
# then PUT updated payload with required_status_checks = [{"context":"all-passed","integration_id":15368}]

Run the swap immediately after merge so in-flight PRs only need a rebase.

Test plan

  • actionlint .github/workflows/automerge-gate.yaml passes
  • pnpm format:check clean
  • On this PR, the new all-passed job appears in the checks list and finishes with success conclusion after the other workflows complete
  • dogfood (skipped) and publish (absent) do not affect the gate's verdict

Adds .github/workflows/automerge-gate.yaml so a single check
(`all-passed`) becomes the only required status, allowing checks
gated by `paths:` (e.g. actionlint) to be observed without blocking
PRs that don't trigger them.

Public mode is used so the gate's check_run is always posted, keeping
manual merges (no `auto_merge_enabled`, no approval) viable. The
follow-up operational step is to switch the branch ruleset's required
status checks from `build_and_test` + `commitlint` to `all-passed`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@wadackel wadackel merged commit 5e7660e into main May 16, 2026
7 checks passed
@wadackel wadackel deleted the chore/gha-2 branch May 16, 2026 13:42
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