Open nowsprinting opened 1 year ago
Inner pull request example (regression test) https://github.com/nowsprinting/pr-labeler-action-test/pull/4
Forked pull request example (fixed this issue, read config from base.ref
)
https://github.com/nowsprinting/pr-labeler-action-test/pull/5
Thanks for the contributions and a special thank you for including test results 🙌
I suppose this is necessary because it doesn't have permissions to read the fork's config file when using the pull_request_target
event?
I suppose this is necessary because it doesn't have permissions to read the fork's config file when using the pull_request_target event?
No. This problem (refs #25 ) has two steps.
Readonly GITHUB_TOKEN
and not read secret on pull_request
trigger
So pr-labeler-action is not work. (See: https://github.com/nowsprinting/pr-labeler-action-test/pull/6 )
Require using pull_request_target
trigger.
fork-repo's head.ref
is not exist in base-repo
Using base.ref
.
Fixed it in this PR.
Changes
base.ref
in read config file when pull request from forked repoReason
head.ref
is fork-repo's ref. It does not exist in base-repo.refs #25