3737 env :
3838 GITHUB_ACTOR : ${{ github.actor }}
3939 with :
40- github-token : ${{ github.token }}
40+ # Use bot PAT, not the default GITHUB_TOKEN: events created by
41+ # GITHUB_TOKEN do not trigger other workflows, so `Automerge For
42+ # Humans` would never see the `labeled` event.
43+ github-token : ${{ secrets.GH_TOKEN }}
4144 script : |
4245 const prDetailsUrl = context.payload.issue.pull_request.url;
4346 const { data: pull } = await github.request(prDetailsUrl);
9396 - name : Add do-not-merge label
9497 uses : actions/github-script@v7
9598 with :
96- github-token : ${{ github.token }}
99+ # Bot PAT so the `labeled` event can trigger downstream workflows.
100+ github-token : ${{ secrets.GH_TOKEN }}
97101 script : |
98102 github.rest.issues.addLabels({
99103 issue_number: context.issue.number,
@@ -119,7 +123,8 @@ jobs:
119123 - name : Add autoupdate label
120124 uses : actions/github-script@v7
121125 with :
122- github-token : ${{ github.token }}
126+ # Bot PAT so the `labeled` event can trigger the autoupdate workflow.
127+ github-token : ${{ secrets.GH_TOKEN }}
123128 script : |
124129 github.rest.issues.addLabels({
125130 issue_number: context.issue.number,
0 commit comments