-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Related: JuliaSmoothOptimizers/LDLFactorizations.jl#137 (comment)
Currently,
RegularizedProblems.jl/.github/workflows/Breakage.yml
Lines 162 to 165 in 6dcffc6
| - name: PR comment with file | |
| uses: thollander/actions-comment-pull-request@v2 | |
| with: | |
| filePath: breakage/summary.md |
always fails if the PR is coming from a fork
For example, in thollander/actions-comment-pull-request
Note that, if the PR comes from a fork, it will have only read permission despite the permissions given in the action for the
pull_requestevent.
In this case, you may use thepull_request_targetevent. With this event, permissions can be given without issue (the difference is that it will execute the action from the target branch and not from the origin PR).
The thing is that using GitHub recommends to use pull_request_target very carefully: https://securitylab.github.com/resources/github-actions-preventing-pwn-requests/
From the latter blog post, we'd need to create an additional workflow, using the pull_request_target to `write a comment in the PR coming from a fork.
I will try to write one for this repo, perhaps it could be general enough to be moved to https://github.com/JuliaSmoothOptimizers/.github afterwards ?