From dce935ce31aea6a4a004de52ef41f41ef5554000 Mon Sep 17 00:00:00 2001 From: Adam Moussa Date: Mon, 24 Aug 2026 13:06:47 -0400 Subject: [PATCH] chore(ci): switch auto-merge from seahaven-bot to Mergify --- .github/workflows/auto-merge.yaml | 44 ------------------------------- .mergify.yml | 23 ++++++++++++++++ 2 files changed, 23 insertions(+), 44 deletions(-) delete mode 100644 .github/workflows/auto-merge.yaml create mode 100644 .mergify.yml diff --git a/.github/workflows/auto-merge.yaml b/.github/workflows/auto-merge.yaml deleted file mode 100644 index f0ef235..0000000 --- a/.github/workflows/auto-merge.yaml +++ /dev/null @@ -1,44 +0,0 @@ -name: Enable auto-merge - -on: - pull_request: - types: [opened, ready_for_review, reopened, synchronize] - branches: [main] - -concurrency: - group: enable-auto-merge-${{ github.event.pull_request.number }} - cancel-in-progress: true - -permissions: - contents: write - pull-requests: write - -jobs: - enable: - if: >- - github.event.pull_request.draft == false - && github.event.pull_request.head.repo.full_name == github.repository - && github.event.pull_request.user.login != 'dependabot[bot]' - && github.event.pull_request.user.login != 'renovate[bot]' - runs-on: ubuntu-latest - steps: - - name: Enable squash auto-merge - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PR: ${{ github.event.pull_request.number }} - REPO: ${{ github.repository }} - run: | - set -euo pipefail - if [ "$(gh pr view "$PR" --repo "$REPO" --json autoMergeRequest --jq '.autoMergeRequest != null')" = "true" ]; then - echo "auto-merge already enabled" - exit 0 - fi - if ! out=$(gh pr merge "$PR" --repo "$REPO" --auto 2>&1); then - echo "$out" - if [ "$(gh pr view "$PR" --repo "$REPO" --json autoMergeRequest --jq '.autoMergeRequest != null')" = "true" ]; then - echo "auto-merge already enabled" - exit 0 - fi - exit 1 - fi - printf '%s\n' "$out" diff --git a/.mergify.yml b/.mergify.yml new file mode 100644 index 0000000..8ea02b1 --- /dev/null +++ b/.mergify.yml @@ -0,0 +1,23 @@ +merge_queue: + mode: serial + max_parallel_checks: 1 + +merge_protections_settings: + auto_merge_conditions: + - base = main + - -draft + - author != dependabot[bot] + - author != renovate[bot] + +queue_rules: + - name: default + queue_conditions: + - base = main + - -draft + - author != dependabot[bot] + - author != renovate[bot] + merge_method: squash + commit_message_format: + title: inherit + body: empty + branch_protection_injection_mode: queue