File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ description: >-
1414 head or merge ref runs untrusted code with the privileges the gate was
1515 protecting.
1616
17- The token must be able to read collaborator permissions, which the default
18- `GITHUB_TOKEN` may not be . If it cannot, this action fails, so an
17+ The default `GITHUB_TOKEN` can read collaborator permissions with no more
18+ than `contents: read` . If a token ever cannot, this action fails, so an
1919 underpowered token denies everyone rather than quietly authorizing them.
2020
2121inputs :
Original file line number Diff line number Diff line change 11name : Test "Authorize Commenter" Action
22
3- # Temporary. This exists to confirm that the default GITHUB_TOKEN can read
4- # collaborator permissions. Remove it, or wire it into main.yml as a permanent
5- # test, once that question is settled.
3+ # Unlike the other test-*.yml workflows, this one triggers directly rather than
4+ # through workflow_call, so that it actually runs on every pull request.
65
76on : pull_request
87
1716 - name : Checkout repository
1817 uses : actions/checkout@v6
1918
19+ # Skipped on forks, where the author has read access and would be refused.
2020 - name : A login with write access is authorized
21+ if : github.event.pull_request.head.repo.fork == false
2122 uses : ./.github/actions/authorize-commenter
2223 with :
2324 username : ${{ github.actor }}
You can’t perform that action at this time.
0 commit comments