I've set up the workflow to auto assign a github team, and it works great for native branches and PRs.
However for forks the workflow fails:
Run necojackarc/[email protected]
with:
config: .github/auto_request_review.yml
Fetching configuration file from the source branch
Error: Error: Parameter token or opts.auth is required
I assume this is a scope issue with the PAT
, so I'm wondering the best way to handle it.
Currently I have the PAT
set as a global secret in our github org since we want to use this workflow across several repos.
My guess is that the forks do not have scope access to the global org secrets. So that leaves two options that I can initially think of.
EDIT
Set the PAT
at the repo level
Set the PAT
on the forked repo
I'm not sure if this case has been worked through in the past, but would be interested in other's opinions while I debug this.
EDIT:
So the root of the issue is the lack of secret access on forks. There is the pull_request_target
trigger, that was created to help with these types of workflows, when write access to the PR is needed from forks for non-security related actions. However I'm struggling to get the workflow to trigger at all now.
So the workflow on main
needs to be updated for it to be triggered, so that is fixed. But I'm still getting the same error.