Created
April 30, 2014 15:15
-
-
Save wesgarrison/d1b74e4b6ab6791e9a3d to your computer and use it in GitHub Desktop.
Make pull request from an issue
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
# template | |
curl --user "<gh-username>" \ | |
--request POST \ | |
--data '{"issue": "<issue-number>", "head": "<owner>:<branch>", "base": "master"}' \ | |
https://api.github.com/repos/<owner>/<repo>/pulls | |
# example | |
curl --user "wesgarrison" \ | |
--request POST \ | |
--data '{"issue": "1", "head": "databasically:00001-my-new-feature", "base": "master"}' \ | |
https://api.github.com/repos/databasically/databasicallydotcom/pulls |
getIssue() {
curl --user "$1" \
--request POST \
--data '{"issue": "$2", "head": "$3:$4", "base": "master"}' \
"https://api.github.com/repos/$3/$5/pulls"
}
getIssue wesgarrison 1 databasically 00001-my-new-feature databasicallydotcom
Like that? If you're in the branch / working directory you can just use a few commands to automatically get that data as well. Current repo and branch are easy to pull, as well as github username.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@ferrislucas Check this out.