DrupalDork.com was shut down on September 18, 2013. This is just a snapshot of the site as it appeared then.

Github: Creating Pull Requests for Existing Issues

Did a quick screencast with some coworkers today on the latest thing I love about Github. Last time, I covered how to create pull requests. This time, I explain how to create a pull request out of an existing issue. Since pull requests are basically just issues with commits attached, it's often undesirable to create a new pull request to address something reported in an existing issue, because you just wind up with two issues that address the same thing.

There isn't a way to do this through the Github interface, but the hub command line tool adds some special sauce for working with Github, and the thing I use it for most is opening pull requests for issues.

The quality is crummy, so turn up the quality to 480p.

Tags:

Category:

Comments

Nice! Thanks hey. Never realized that, but totally helpful!

I found hub a few months ago and tried this and it didn't work. I believe it was because it wouldn't let me attach a pull request to an issue I didn't create.

In other words, there was an existing issue someone had created and I wanted to fix it. But hub wouldn't let me attach the pull request to someone else's issue.

I uninstalled hub because it "didn't work", so my memory is a little fuzzy. (It may have been that I assumed "pull-request" would push the branch to my fork. I don't remember the details of what I did.) Have you tried adding a pull request to someone else's issue?

I HAVE attached code to issues that were created by someone else, but I've only been using this on one project right now, and I probably have some kind of elevated rights on it. I don't have access to the Admin settings for the repo, in the GitHub web interface. So, I'm not a full admin, but there may be a not-quite-admin level that I have on that repo.

I just came across a comment on one of the issues on hub that confirms your theory:

You can only turn your own issues into pull requests; this is GitHub's limitation. This way you can't hijack other people's issues.