Turning an existing GitHub Issue into a Pull Request
Why?
This command attaches code (pull request) to an existing issue.
This prevents:
- creating a new issue when opening a new pull-request
- splitting an on-growing discussion from an issue into an pull request issue
Usage?
You can use personal and organization github names and their branches.
git pull-request
- -i issue-number-without-the-#
- -b request-to-branch
- -h request-from-branch
Be sure you are on the right local git repo (git branch
) and try a command like the following (replace the githubnames, branchnames and issue number):
git pull-request -i 123 -b defunkt:develop -h defunkt:feature/awesomeness
Installation?
# install on OS X
$ brew install hub
# other systems
$ curl http://defunkt.io/hub/standalone -sLo ~/bin/hub
$ chmod +x ~/bin/hub
# alias it as git
$ alias git=hub
$ git version
git version 1.7.9
hub version 1.8.4 # ← it works!
Written by llabball
Related protips
2 Responses
So there is no way to do this without using hub :\ (or otherwise manually performing an api request)
over 1 year ago
·
@thorsummoner of course you don't need to use hub
. instead you can talk straight with the github API, (which will prompt for password authentication):
curl --user "johndoe" \
--request POST \
--data '{"issue": "123", "head": "defunkt:feature/awesomeness", "base": "defunkt:develop"}' \
https://api.github.com/repos/defunkt/hub/pulls
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Issue tracker
Authors
i02sopop
1.335K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#