| Thread overview | |||||||||
|---|---|---|---|---|---|---|---|---|---|
|
February 22, 2012 GitHub pull requests made easy | ||||
|---|---|---|---|---|
| ||||
The overhead of creating pull requests was getting to me, so I've written a little script to make it easier: https://gist.github.com/1885859 This script does three things: 1) Pushes the current branch to your GitHub fork 2) Sets the default remote for the branch, so that you can just type "git push" to update your pull request 3) Opens a web browser on the "Create pull request" form, so that you don't have to go to GitHub, navigate to your fork, select the new branch, and click the "Pull Request" button. It will use your GitHub username (if you've set github.user) to find the remote name of your fork. Otherwise, just specify the name of the remote corresponding to your fork as the first parameter. If you create a git alias, you can type "git pullrequest" to run it. To do that, add the line "pullrequest = !/path/to/git-pullrequest.sh $*" to the [alias] section of your ~/.gitconfig. The script is not specific to D; it will work for any GitHub fork. Happy contributing! | ||||
February 22, 2012 Re: GitHub pull requests made easy | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Vladimir Panteleev | "Vladimir Panteleev" <vladimir@thecybershadow.net> wrote in message news:hvwkhrqbzbeeqhewmyed@forum.dlang.org... > The overhead of creating pull requests was getting to me, so I've written a little script to make it easier: > > https://gist.github.com/1885859 > > This script does three things: > > 1) Pushes the current branch to your GitHub fork > 2) Sets the default remote for the branch, so that you can just type "git > push" to update your pull request > 3) Opens a web browser on the "Create pull request" form, so that you > don't have to go to GitHub, navigate to your fork, select the new branch, > and click the "Pull Request" button. > > It will use your GitHub username (if you've set github.user) to find the remote name of your fork. Otherwise, just specify the name of the remote corresponding to your fork as the first parameter. > > If you create a git alias, you can type "git pullrequest" to run it. To do that, add the line "pullrequest = !/path/to/git-pullrequest.sh $*" to the [alias] section of your ~/.gitconfig. > > The script is not specific to D; it will work for any GitHub fork. > > Happy contributing! Great idea! This is actually one example though of why I think GitHub/BitBucket-style functionality should be built into DVCSes. | |||
February 22, 2012 Re: GitHub pull requests made easy | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Vladimir Panteleev | On Wednesday, 22 February 2012 at 16:51:14 UTC, Vladimir Panteleev wrote: > The overhead of creating pull requests was getting to me, so I've written a little script to make it easier: > > https://gist.github.com/1885859 Personally, I use »hub« as a wrapper for Git all the time: https://github.com/defunkt/hub. Among other things (such as GitHub username/fork awareness when cloning/adding remotes, directly cherry-picking from web URLs, …), it also gives you a »git pull-request« command doing exactly what the name suggests. Also, GitHub recently rolled out a pull request creation shortcut on their repository pages: https://github.com/blog/1039-easier-pull-request-creation David | |||
February 22, 2012 Re: GitHub pull requests made easy | ||||
|---|---|---|---|---|
| ||||
Posted in reply to David Nadlinger | "David Nadlinger" <see@klickverbot.at> wrote in message news:ziirmcwpgshvrymgerfe@forum.dlang.org... > On Wednesday, 22 February 2012 at 16:51:14 UTC, Vladimir Panteleev wrote: >> The overhead of creating pull requests was getting to me, so I've written a little script to make it easier: >> >> https://gist.github.com/1885859 > > Personally, I use »hub« as a wrapper for Git all the time: https://github.com/defunkt/hub. Among other things (such as GitHub username/fork awareness when cloning/adding remotes, directly cherry-picking from web URLs, .), Neat. Hopefully it'll add BitBucket support too at some point. > it also gives you a »git pull-request« command doing exactly what the name suggests. > TortoiseGit also has a built-in Pull Request feature, although I've yet to figure out how to work it. > Also, GitHub recently rolled out a pull request creation shortcut on their repository pages: https://github.com/blog/1039-easier-pull-request-creation > > David | |||
February 22, 2012 Re: GitHub pull requests made easy | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Vladimir Panteleev | On 2/22/2012 8:51 AM, Vladimir Panteleev wrote: > The overhead of creating pull requests was getting to me, so I've written a little script to make it easier: > > https://gist.github.com/1885859 > > This script does three things: > > 1) Pushes the current branch to your GitHub fork > 2) Sets the default remote for the branch, so that you can just type "git push" to update your pull request > 3) Opens a web browser on the "Create pull request" form, so that you don't have to go to GitHub, navigate to your fork, > select the new branch, and click the "Pull Request" button. > > It will use your GitHub username (if you've set github.user) to find the remote name of your fork. Otherwise, just specify the name of the remote corresponding to your fork as the first parameter. > > If you create a git alias, you can type "git pullrequest" to run it. To do that, add the line "pullrequest = !/path/to/git-pullrequest.sh $*" to the [alias] section of your ~/.gitconfig. > > The script is not specific to D; it will work for any GitHub fork. > > Happy contributing! You could avoid the web ui interaction and just use the github api's. See: https://developer.github.com/ | |||
February 22, 2012 Re: GitHub pull requests made easy | ||||
|---|---|---|---|---|
| ||||
Posted in reply to David Nadlinger | On Wednesday, 22 February 2012 at 18:10:24 UTC, David Nadlinger wrote: > On Wednesday, 22 February 2012 at 16:51:14 UTC, Vladimir Panteleev wrote: >> The overhead of creating pull requests was getting to me, so I've written a little script to make it easier: >> >> https://gist.github.com/1885859 > > Personally, I use »hub« as a wrapper for Git all the time: https://github.com/defunkt/hub. Among other things (such as GitHub username/fork awareness when cloning/adding remotes, directly cherry-picking from web URLs, …), it also gives you a »git pull-request« command doing exactly what the name suggests. Not bad, does it work on Windows? I don't like that it opens an editor for writing the pull request details. Being able to review your markdown formatting / diff / commits on the website is useful. > Also, GitHub recently rolled out a pull request creation shortcut on their repository pages: https://github.com/blog/1039-easier-pull-request-creation One step less, three remain :P | |||
February 22, 2012 Re: GitHub pull requests made easy | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Nick Sabalausky Attachments:
| On Wed, Feb 22, 2012 at 11:20 AM, Nick Sabalausky <a@a.a> wrote: > "David Nadlinger" <see@klickverbot.at> wrote in message news:ziirmcwpgshvrymgerfe@forum.dlang.org... > > On Wednesday, 22 February 2012 at 16:51:14 UTC, Vladimir Panteleev wrote: > >> The overhead of creating pull requests was getting to me, so I've > written > >> a little script to make it easier: > >> > >> https://gist.github.com/1885859 > > > > Personally, I use »hub« as a wrapper for Git all the time: https://github.com/defunkt/hub. Among other things (such as GitHub username/fork awareness when cloning/adding remotes, directly cherry-picking from web URLs, .), > > Neat. Hopefully it'll add BitBucket support too at some point. > > Defunkt is one of the founders of GitHub so I wouldn't wait around for it. Regards, Brad Anderson > > it also gives you a »git pull-request« command doing exactly what the > name > > suggests. > > > > TortoiseGit also has a built-in Pull Request feature, although I've yet to figure out how to work it. > > > Also, GitHub recently rolled out a pull request creation shortcut on > their > > repository pages: https://github.com/blog/1039-easier-pull-request-creation > > > > David > > > | |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply