Last active
December 17, 2015 22:09
-
-
Save nathanrice/5679587 to your computer and use it in GitHub Desktop.
Convert GitHub issue into a Pull Request
This file contains 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 (in both places). | |
# 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