Skip to content

Commit 22d4687

Browse files
topcoder1claude
andauthored
ci: install safe-paths auto-merge (#5)
Adds the safe-paths auto-merge caller from `topcoder1/ci-workflows`. **What this enables:** - PRs whose diff touches **only** safe paths (`docs/**`, `tests/**`, `test_*.py`, `*_test.*`, `*.test.*`, `*.spec.*`, `**/__tests__/**`) get `gh pr merge --auto --squash` called automatically — any author. - All-or-nothing: any one unsafe path defers to `claude-author-automerge.yml` or manual click. - Branch protection still applies — required checks must pass before auto-merge fires. **Why this is safe:** - Docs have zero runtime impact. - Tests cannot break runtime (failing tests do not ship; passing tests do not change behavior). - Maintainers click-merging typo fixes and test additions is alarm-fatigue-by-design — the path classification IS the safety argument. **Auto-merge rationale:** workflow file → manual click-merge per CLAUDE.md. The whole point of the workflow being installed is to handle *future* docs/tests-only PRs — not this one. 🤖 Auto-installed via [install-safe-paths-automerge.sh](https://github.com/topcoder1/dotclaude/blob/main/templates/ci-workflows/scripts/install-safe-paths-automerge.sh) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent cad59dc commit 22d4687

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Safe-paths Auto-merge
2+
3+
# Auto-enables `gh pr merge --auto --squash` on any PR (any author) whose
4+
# diff touches ONLY safe paths (docs, tests, test_*.py / *_test.* /
5+
# *.test.* / *.spec.* / **/__tests__/**). All-or-nothing: one unsafe
6+
# file in the diff and this workflow no-ops, deferring to
7+
# claude-author-automerge.yml (or manual click).
8+
#
9+
# Branch protection's required-status-checks still apply — auto-merge
10+
# waits for them. Reusable defined at:
11+
# topcoder1/ci-workflows/.github/workflows/safe-paths-automerge.yml
12+
13+
on:
14+
pull_request:
15+
types: [opened, synchronize, reopened, ready_for_review]
16+
17+
permissions:
18+
contents: write
19+
pull-requests: write
20+
21+
concurrency:
22+
group: safe-paths-automerge-${{ github.event.pull_request.number }}
23+
cancel-in-progress: true
24+
25+
jobs:
26+
automerge:
27+
uses: topcoder1/ci-workflows/.github/workflows/safe-paths-automerge.yml@main
28+
secrets: inherit
29+
with:
30+
merge_method: squash

0 commit comments

Comments
 (0)