-
-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Introduced in #6 and updated via #40, the publish-wiki.yml
currently contains the following step which is executed during PR dry-runs:
PHP_CodeSniffer-documentation/.github/workflows/publish-wiki.yml
Lines 129 to 143 in c923cac
- name: "[PR only] Post comment to review artifact" | |
if: ${{ github.event_name == 'pull_request' }} | |
uses: mshick/add-pr-comment@v2 | |
with: | |
repo-token: ${{ secrets.COMMENT_ON_PRS_TOKEN }} | |
message: | | |
**_=== This is an auto-generated comment ===_** | |
Thank you for your PR. | |
A dry-run has been executed on your PR, executing all markdown pre-processing for the wiki files. | |
Please review the resulting final markdown files via the [created artifact](${{ steps.artifact.outputs.artifact-url }}). | |
This is especially important when adding new pages or updating auto-generated output blocks. | |
_N.B.: the above link will automatically be updated when this PR is updated._ |
The problem is that the comment does not get added to PR coming from forks.
The action runner has a section about this in their documentation, but that would require setting up a proxy: https://github.com/mshick/add-pr-comment?tab=readme-ov-file#proxy-for-fork-based-prs
I was hoping to avoid that by using a Personal Access Token (PAT) instead of the standard GITHUB_TOKEN
for repo access. Unfortunately, that didn't work.
So the problem to be solved is how to get the comment posted on PRs coming from forks.
Oh and it would be great if the posting of the comment would be done from a "robot" (like GitHub[bot]
) account instead of from my personal account (which is what's currently happening due to the use of the PAT).
I'm not married to the current action runner being used, though I did do research into various action runners for this task when creating the workflow and didn't find a better one.
Either way, all options to potentially solve this are open.