-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
convert issue to pull request #2614
Comments
Here's some discussion around that API mislav/hub@2a748a0 |
Interesting, thanks for the links. However I can't find a way to do this outside |
@fregante that's odd, hub is just using the v3 API which is available to refined-github |
No reference to it in its pages though https://developer.github.com/v3/issues/ |
I think it's undocumented |
Although it seems it was documented and marked deprecated, then the deprecation removed: mislav/hub#2038 (comment) |
Here's some more discussion about the API being un-deprecated mislav/hub#1927 |
Honestly it's not a workflow I'd like to highlight on the web. It may sound good on private projects but sometimes an issue ends up with many PRs. The current "PR fixes Issue" standard is preferable on most projects. If you need this feature, I'd suggest creating a separate extension so only those who need it have it. From what I understand, you call the "update issue" API¹ and provide all the parameters you'd send to the "create PR" API ² ¹ https://github.com/github/hub/blob/7b02a665ddacd885ad017a7c6904e662c8417bf8/github/client.go#L778 |
by creating a PR with the API using
{"issue": <issuenumber>}
you can convert that issue into a PRHere's an example of this undocumented API feature in use by Hub:
https://github.com/github/hub/blob/7b02a665ddacd885ad017a7c6904e662c8417bf8/commands/pull_request.go#L53-L59
https://github.com/github/hub/blob/7b02a665ddacd885ad017a7c6904e662c8417bf8/commands/pull_request.go#L350-L353
Example URL:
The text was updated successfully, but these errors were encountered: