File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 11# This workflow makes sure contributors don't forget to add a changelog entry or explicitly opt-out of it.
2+ #
3+ # Do not extend this workflow to include checking out the code (e.g. for building and testing purposes) while the pull_request_target trigger is used.
4+ # Instead, see use of workflow_run in https://securitylab.github.com/resources/github-actions-preventing-pwn-requests/
25
36name : Changelog
47
58on :
6- pull_request :
9+ # The pull_request_target trigger event allows PRs raised from forks to have write permissions and access secrets.
10+ # We uses it in this workflow to enable writing comments to the PR.
11+ pull_request_target :
712 types :
813 - opened
914 - ready_for_review
1217 - labeled
1318 - unlabeled
1419
15- # This workflow runs for not-yet-reviewed external contributions and so it
16- # intentionally has no write access and only limited read access to the
17- # repository .
20+ # This workflow runs for not-yet-reviewed external contributions.
21+ # Following a pull_request_target trigger the workflow would have write permissions,
22+ # so we intentionally restrict the permissions to only include write access on pull-requests .
1823permissions :
1924 contents : read
2025 pull-requests : write
@@ -155,4 +160,4 @@ jobs:
155160 }
156161
157162 // Nothing to complain about, so delete any existing comment
158- await createOrUpdateChangelogComment("", true);
163+ await createOrUpdateChangelogComment("", true);
You can’t perform that action at this time.
0 commit comments