foxfirefey: A picture of GIR. (gir)
foxfirefey ([personal profile] foxfirefey) wrote in [site community profile] dw_dev2012-11-09 03:08 pm
Entry tags:

Best way to review pull requests

So, as far as I can tell from my researching over the past few days, the only real way to get a pull request to review it is to:

* Manually add the submitter's dw-* repo as a remote in the repo on your hack (or Github I suppose, but there is no GUI advantage here).
* Manually pull the branch in question

Is there a better way to do this? Am I missing something? This seems really, well, annoying, with manually crafting URLs and whatnot, and not very user friendly. (I'm trying to make some documents on reviewing pull requests for people who are not [personal profile] fu, since we need to try and spread out that work a little.)
mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)

[staff profile] mark 2012-11-10 12:39 am (UTC)(link)
That's the canonical method.

I usually use the web UI for everything up until the point where I want to either test the code or make changes. Admittedly, taking a pull request makes it slightly harder to edit someone's code before accepting it for commit.

There is another method:

https://gist.github.com/3342247

I haven't really played with that though, so I don't know exactly what it enables you to do. I believe that using this method you would easily be able to check out a pull request and then test it locally. Whether or not you could then push back to that pull request... I'm not sure. Worth a test.
fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)

[personal profile] fu 2012-11-10 03:10 am (UTC)(link)
I use the method that Mark linked to. After which, it's:

git checkout pr/123

And then testing.

One interesting thing I've seen recently is the hub command, but I haven't played with it enough to integrate it into my workflow.
cdybedahl: (Default)

[personal profile] cdybedahl 2012-11-10 10:01 am (UTC)(link)
You don't have to add the URL of the repo with the pull request in it as a remote. It's enough to give it on the command line when doing "git pull". If you get the announce emails that GitHub sends out when a pull request is made, there is a line in there that you can cut-n-paste and run locally to get the suggested changes into a local repo of your own.