diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 9381fca..684ec88 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -6,12 +6,16 @@ # Runs from the base branch (pull_request_target) and checks out no pull request # code, so a pull request cannot change how it is merged. A pull request that # touches .github/ is refused: a workflow change needs a person to merge it. +# +# `issues: write` is needed so the merge that GitHub performs under this token can +# close the issue named by the PR's `Closes #N` line; without it the issue stays open. name: automerge on: pull_request_target: types: [labeled] permissions: contents: write + issues: write pull-requests: write jobs: enable: