Repository navigation
Commit 5afd715
CI: run the changelog job for pull requests from forks
`Populate Changelog` fails for every pull request opened from a fork, and only
those. GitHub withholds secrets from a `pull_request` run whose head is a fork,
so `secrets.RELEASE_TOKEN` is empty and the checkout stops after a few seconds:
##[error]Input required and not supplied: token
The effect is that no outside contribution gets a changelog entry. #1102, #1103
and #1108 all landed without one and had to be added by hand.
`pull_request_target` receives secrets because it runs in the context of the
base repository. That is also why it needs care, and why this belongs on master
rather than develop: the workflow definition is read from the default branch,
so a copy that only exists on develop would never be loaded.
Nothing from the pull request is executed here. The checkout is `ref: develop`,
the updater is inline in the workflow rather than a script from the tree, and
the title and labels reach Python through the environment instead of the shell.
`permissions` drops to `contents: read`. The job's writes go through
RELEASE_TOKEN, which the checkout persists, so GITHUB_TOKEN does not need write
and should not have it now that the trigger runs with secrets available.
Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com>1 parent 25271f4 commit 5afd715
1 file changed
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
4 | 11 | | |
5 | 12 | | |
6 | 13 | | |
7 | 14 | | |
| 15 | + | |
| 16 | + | |
8 | 17 | | |
9 | | - | |
| 18 | + | |
10 | 19 | | |
11 | 20 | | |
12 | 21 | | |
| |||
0 commit comments