diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml index e41f3ace..924a960a 100644 --- a/.github/workflows/auto-merge.yml +++ b/.github/workflows/auto-merge.yml @@ -10,14 +10,14 @@ on: - synchronize - ready_for_review -permissions: - contents: read - jobs: enable: name: Enable auto-merge runs-on: ubuntu-latest timeout-minutes: 5 + permissions: + contents: write + pull-requests: write steps: # This workflow intentionally does not check out or execute PR code. - name: Check whether the author has write access @@ -40,10 +40,7 @@ jobs: github.event.pull_request.draft == false && steps.author-permission.outputs.can-push == 'true' env: - # A fine-grained PAT or GitHub App token is required here. The built-in - # GITHUB_TOKEN cannot add PRs to a merge queue and can suppress - # downstream push-triggered workflows such as production deployment. - GH_TOKEN: ${{ secrets.AUTOMERGE_TOKEN }} + GH_TOKEN: ${{ github.token }} PR_URL: ${{ github.event.pull_request.html_url }} run: | gh pr merge --auto --merge "$PR_URL"