From df20f73b7a21cd6114860984a834b9949613fca4 Mon Sep 17 00:00:00 2001 From: Roger Date: Sun, 2 Aug 2026 20:57:51 +0800 Subject: [PATCH] ci: auto-merge the generated contributors PR (#627) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without it the bot PR sits until a human clicks merge, and every later push to main opens another duplicate — the action mints a fresh branch and PR each run with no dedup. --- .github/workflows/contributors.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/contributors.yml b/.github/workflows/contributors.yml index e29e072..8f1c65d 100644 --- a/.github/workflows/contributors.yml +++ b/.github/workflows/contributors.yml @@ -27,6 +27,7 @@ jobs: token: ${{ steps.app-token.outputs.token }} - name: Update contributors list + id: contributors uses: akhilmhdh/contributors-readme-action@v2.3.11 env: GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} @@ -37,3 +38,11 @@ jobs: auto_detect_branch_protection: true commit_message: 'chore: update contributors list' pr_title_on_protected: 'chore: update contributors list' + + - name: Enable auto-merge + if: steps.contributors.outputs.pr_id != '' + env: + GH_TOKEN: ${{ steps.app-token.outputs.token }} + PR: ${{ steps.contributors.outputs.pr_id }} + REPO: ${{ github.repository }} + run: gh pr merge "$PR" --squash --auto -R "$REPO"