Skip to content

Commit 9d8a8d1

Browse files
committed
GH Actions/publish-wiki: use PAT for commenting on PRs
In the original PR (#6), a Personal Access Token (PAT) was used, but that resulted in the comment being left as if coming from my account, which is misleading, which is why the `repo_token` was initially switched back to `secrets.GITHUB_TOKEN`, with a reminder that a test would need to be done with a PR coming from a fork to verify that the auto-comment would still work. As the first PR from a fork has now come in (#38), it has become clear that the auto-comment does not work with the default GitHub token, so this commit switches the `repo_token` back to the Personal Access Token and updates the message to make it clear I did not leave the comment. We'll still have to test (again) whether using the PAT works for PRs coming from forks. If not, we'll have to revisit this workflow step.
1 parent 0d46d25 commit 9d8a8d1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/publish-wiki.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,10 @@ jobs:
130130
if: ${{ github.event_name == 'pull_request' }}
131131
uses: mshick/add-pr-comment@v2
132132
with:
133-
repo-token: ${{ secrets.GITHUB_TOKEN }}
133+
repo-token: ${{ secrets.COMMENT_ON_PRS_TOKEN }}
134134
message: |
135+
\[This is an auto-generated comment\]
136+
135137
Thank you for your PR.
136138
A dry-run has been executed on your PR, executing all markdown pre-processing for the wiki files.
137139

0 commit comments

Comments
 (0)