name: Automerge # Triggers: # - pull_request: fires when PR is opened, labeled, updated, etc. # Handles the case where the label is added after CI already passed. # - workflow_run (CI): fires after the CI workflow completes. # This is needed because check_suite and status events don't reliably # fire for workflows on the same commit (GitHub prevents infinite loops). # Without this, the automerge action never retries after CI passes. on: pull_request: types: - labeled - unlabeled - synchronize - opened - edited - ready_for_review - reopened - unlocked pull_request_review: types: - submitted workflow_run: workflows: ["CI"] types: - completed env: FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true jobs: automerge: name: Automerge PR runs-on: ubuntu-latest permissions: contents: write pull-requests: write steps: - uses: actions/checkout@v6 - name: Automerge uses: pascalgn/automerge-action@v0.16.4 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} MERGE_LABELS: "automerge" MERGE_METHOD: "merge" MERGE_DELETE_BRANCH: "true" MERGE_READY_STATE: "clean" UPDATE_METHOD: "rebase" BASE_BRANCHES: "main"