From 2efab181e4665ccad3c95722f75430137e2bcb2f Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 12 Feb 2026 04:27:42 +0000 Subject: [PATCH] Replace Mergify with GitHub Actions automerge workflow Remove .mergify.yml and add a native GitHub Actions workflow that auto-approves and auto-merges Renovate bot PRs. The workflow uses `gh pr merge --auto --merge` which respects branch protection rules and waits for required status checks before merging. https://claude.ai/code/session_01GEaMsaMjSF4EWrjbPkKteY --- .github/workflows/automerge.yml | 34 +++++++++++++++++++++++++++++++++ .mergify.yml | 19 ------------------ 2 files changed, 34 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/automerge.yml delete mode 100644 .mergify.yml diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml new file mode 100644 index 00000000..499cd25b --- /dev/null +++ b/.github/workflows/automerge.yml @@ -0,0 +1,34 @@ +name: Automerge +on: + pull_request_target: + types: [opened, synchronize, reopened, review_requested] + +permissions: + contents: write + pull-requests: write + packages: read + +jobs: + renovate-automerge: + runs-on: ubuntu-latest + if: github.actor == 'renovate[bot]' + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Approve PR if not already approved + run: | + if [ "$(gh pr view "$PR_URL" --json reviewDecision -q .reviewDecision)" != "APPROVED" ]; then + gh pr review --approve "$PR_URL" + else + echo "PR already approved." + fi + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Enable auto-merge for Renovate PRs + run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.mergify.yml b/.mergify.yml deleted file mode 100644 index 11d12c34..00000000 --- a/.mergify.yml +++ /dev/null @@ -1,19 +0,0 @@ -pull_request_rules: - - name: Automatic merge once requested reviews are complete - conditions: - - and: - - "#approved-reviews-by>=1" - - "#review-requested=0" - - "#changes-requested-reviews-by=0" - - check-success=CI - actions: - merge: - method: merge - - name: automatic merge for Renovate pull requests - conditions: - - and: - - author=renovate[bot] - - check-success=CI - actions: - merge: - method: merge