-
-
Notifications
You must be signed in to change notification settings - Fork 785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Verify that PR creators are members of the website-write team #6959
Conversation
Fix Conflicts
…verify-pr-author-3906 Syncing with gh-pages
…verify-pr-author-3906 Re-sync with upstream repository
I couldn't find information on repo tokens so I just used the HACKFORLA_BOT_PA_TOKEN I saw in other yml files, the code should be testable but I'll need to add a token with the right privileges (admin:org specifically) before it can be merged. Or maybe the privileges are fine but I need to call it a 'repo-token' instead of a 'github-token' like in the other files? I had to switch it to github-token to test it, I'll try switching it back. I'm now seeing a 403 error in the workflow logs, so at least the API call is being made but it seems like the token lacks privileges. @t-will-gillis any idea on which token may work here? |
Hi @ajb176
The info about tokens is in a difficult to find place due to the Wiki still not being updated. The current version of the Hack for LA's GitHub Actions is in this link, and if you scroll down to Tip 7 the token scopes are listed (see Details):
If it is an issue with a lack of scopes, the Additionally: you could try adding in:
to your yml |
Thanks @t-will-gillis I think the admin token might work, I'll do some trial and error and see if I can get it working. It seems like the issue might have been the fact that the trigger is pull_request instead of pull_request_target, in which case the workflow wouldn't be granted access to tokens in the base repository. I've tested a personal access token with the same scope as the admin token locally, and I added a new yml file with the pull_request_target trigger and it seems like it's working. I'm pretty confident this was the problem but I'll make a new PR tomorrow and check. |
Fixes #3906
What changes did you make?
Why did you make the changes (we will use this info to test)?
Instructions for Reviewers:
- 'verify-pr-author-3906'
on line 8 aligned with the other two branchesrepo-token
withgithub-token
on line 43 and replace the current token with a user-generated token (Instructions here)Make sure to push the necessary changes to the verify-pr-author branch before using checkout to create the testcase branches. The testcase branches should be one commit past the verify-pr branch to avoid headaches when trying to merge the testcase branch into the base branch. If you'd rather not mess with the original branch, you can also checkout a new branch immediately after pulling the verify-pr-author-3906 branch, and follow the instructions while using the new branch name in steps 1, 4, 6, 7 and 9.