Documentation
README
push-to-forked-pr
The whole point of this skill: origin is usually the upstream, but the PR's head is on someone else's fork. Pushing to origin updates the upstream's branch, not the PR. You have to push to the fork.
GitHub allows this in two situations:
- You are the fork owner โ straightforward, you own that branch.
- You are an upstream maintainer and the PR has
maintainerCanModify: true(the "Allow edits from maintainers" checkbox the PR author leaves on by default). GitHub then lets the upstream's auth push to the fork branch.
If neither holds, abort and tell the user only the fork owner can push.
Procedure
1. Read the PR's head metadata
This is the opening of the README. Read the full README on GitHub.