From 06e8ae2fc0bde388a1437869a07723fda3961dfb Mon Sep 17 00:00:00 2001 From: ci-bot Date: Sat, 2 May 2026 20:28:14 -0700 Subject: [PATCH] ci: install safe-paths auto-merge MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds the safe-paths auto-merge caller from topcoder1/ci-workflows. PRs whose diff touches only docs/**, tests/**, test_*.py, *_test.*, *.test.*, *.spec.*, or **/__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's required-status-checks still apply. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/safe-paths-automerge.yml | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/safe-paths-automerge.yml diff --git a/.github/workflows/safe-paths-automerge.yml b/.github/workflows/safe-paths-automerge.yml new file mode 100644 index 0000000..73f292c --- /dev/null +++ b/.github/workflows/safe-paths-automerge.yml @@ -0,0 +1,30 @@ +name: Safe-paths Auto-merge + +# Auto-enables `gh pr merge --auto --squash` on any PR (any author) whose +# diff touches ONLY safe paths (docs, tests, test_*.py / *_test.* / +# *.test.* / *.spec.* / **/__tests__/**). All-or-nothing: one unsafe +# file in the diff and this workflow no-ops, deferring to +# claude-author-automerge.yml (or manual click). +# +# Branch protection's required-status-checks still apply — auto-merge +# waits for them. Reusable defined at: +# topcoder1/ci-workflows/.github/workflows/safe-paths-automerge.yml + +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + +permissions: + contents: write + pull-requests: write + +concurrency: + group: safe-paths-automerge-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + automerge: + uses: topcoder1/ci-workflows/.github/workflows/safe-paths-automerge.yml@main + secrets: inherit + with: + merge_method: squash