-
Notifications
You must be signed in to change notification settings - Fork 49
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
support pull_request_target
event
#296
Comments
I don’t believe this is possible from what I know from the GH API. In order to do this the action would need to know about the forks and have permission on the fork itself. After the above it would somehow trigger the update from the fork 😅 |
@KhudaDad414 did you ever find a solution for this? I'm also trying to update branches of PRs from forks (if a contributor has "allow edits by maintainers" and also checks a box in my PR template). I'm using Error: Could not update pull request #34 due to an authorisation error. This is probably because this pull request is from a fork and the current token does not have write access to the forked repository. Error was: Must have admin rights to Repository. The user who own's the PAT is an owner of my repo... I can also update the PR from this button, so seems like I do have proper permissions. Edit: |
I think I've finally found the solution to this problem. To bypass github's API limitations, I did the update via Feel free to copy the solution for this project |
Context
We were using this action to update branches and it worked fine for
push
event. Now we are trying to add the capability for contributors to update their branch from PRs.Problem
Since we are using forks for contributions and the
pull_request
event causes the workflow to run on the fork, and forks don't have access to thesecrets
, hence, this error will show up: https://github.com/asyncapi/glee/runs/5838503289?check_suite_focus=truePossible solution
adding support for
pull_request_target
may be the solution here.Related to #212
The text was updated successfully, but these errors were encountered: