Hub: "A pull request already exists" error should show the url

Created on 14 Apr 2015  路  5Comments  路  Source: github/hub

When running hub pull-request, the "A pull request already exists for ..." error message should also show the URL, just like a successful attempt would do.

feature pull-request

Most helpful comment

i would like to see more an:

hub pull-request --check check if an exisiting pull request exists and display the id and/or name

All 5 comments

Good idea!

We'll need to make an extra HTTP request to fetch the existing PR ID, but it might be worth it. Will keep for consideration.

I would absolutely love this. We do a form of PR deploys instead of branch deploys (just naming semantics). It'd be nice to be able to run hub pull-request and get back either a URL I can parse or just the PR number that I can then use. Any of the following would be excellent:

fatal: pull request for branch `my-feature` already exists: #1652
https://github.com/org/repo/pull/1652

(this is nice because I can do hub pull-request | xargs open)

Your pull request already exists: https://github.com/org/repo/pull/1652

+1
I'm automating github pull requests and merges and this would be just a beautiful addition...
It would allow me to deploy fully without any manual interaction (saving me and other project maintainers so many precious hours each month)
If there is enough interest, I'll pull up the go documentation and write the thing myself. (just do +1 and tag me)

Alternatively, if you could see the branch names from hub issue or git issue then that would be a super-awesome feature.
We could check the exit status of hub pull-request, then based on that, see if a PR exists or not and take the appropriate action

i would like to see more an:

hub pull-request --check check if an exisiting pull request exists and display the id and/or name

Was this page helpful?
0 / 5 - 0 ratings