ci: auto-merge docs and chore PRs on green#3
Merged
Conversation
Add a workflow that enables GitHub auto-merge for pull requests whose title starts with `docs:` or `chore:`, so documentation and housekeeping changes land without a manual merge once the required checks pass. All other prefixes (feat/fix/ci/refactor/test) are left untouched and wait for an explicit merge. Required approvals stay at 0 and the ruleset is unchanged, so the author can still merge their own feature PRs; the docs/chore distinction is enforced entirely by this workflow arming auto-merge selectively. Checks still gate every merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
.github/workflows/auto-merge.yml: enables GitHub auto-merge for PRs whose title starts withdocs:orchore:, so they land hands-free once the required checks pass. feat/fix/ci/refactor/test PRs are left untouched and wait for a manual merge.Mechanism (no ruleset change): required approvals stay at 0, so you can still merge your own feature PRs. The docs/chore distinction is enforced by the workflow arming auto-merge selectively, not by the branch ruleset. Required status checks still gate every merge.
Safety notes:
pull_requesttrigger (notpull_request_target); no third-party actions, so nothing to pin.if:expression (startsWith), never interpolated into a shell — no script-injection surface.permissions: contents: read; the single job scopescontents: write+pull-requests: write, whichenablePullRequestAutoMergerequires.Per its own policy, this
ci:PR is left for you to merge manually.Assisted-by: Claude:claude-opus-4-8