From 4257396f8bb7099c1e21709629901f426845df0a Mon Sep 17 00:00:00 2001 From: hsinatfootprintai <149764663+hsinatfootprintai@users.noreply.github.com> Date: Tue, 27 Oct 2026 11:55:16 +0800 Subject: [PATCH] ci(automerge): grant issues: write so an auto-merged PR closes its issue PR #34 carried "Closes #33" and was auto-merged by the automerge workflow, but issue #33 stayed open. The workflow's permissions block grants only contents and pull-requests, so the issues scope is none for the token that performs the merge. A person-merged PR (#35) closed its issue normally. Add issues: write. Co-Authored-By: Claude Sonnet 5.5 --- .github/workflows/automerge.yml | 4 ++++ 1 file changed, 4 insertions(+) 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: