-
-
Save sunnyratilal/5680271 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Replace [username] with your GitHub username. | |
# Replace [project]/[repository] with the project and repository where the issue resides. | |
# Replace [base] with the destination branch you wish to PR to (usually master or develop) | |
# And obviously, don't leave the [] brackets in there. | |
# Usage: | |
# @git-pr 999 features/999 | |
# Where 999 is the issue you wish to attach a PR to, and features/999 is the branch you wish to use for the PR. | |
function @git-pr() { | |
curl --user "[username]" --request POST --data '{"issue": "'$1'", "head": "username:'$2'", "base": "[base]"}' https://api.github.com/repos/[project]/[repository]/pulls | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment