Un-deprecate converting issues to pull requests

5 years ago, in anticipation of an API change, I have made the call to
deprecate issue-to-PR conversion in hub. 4f70dd126f

Issue-to-PR conversion was wonky at those times, poorly understood, and
was generating a lot of support requests to hub's issue tracker that I
didn't want to deal with. In most cases, people tried to convert issues
that they have no rights over and they would get a cryptic validation
error in the API response.

Since then, there was a consistent plea from the hub community to keep
this feature as some teams seem to rely on this for their workflows. I
have consulted with other GitHub employees about the stableness of this
feature, and anecdotal evidence suggests that lately there haven't been
as many problems around this as there have been in the past. Also, the
GitHub API v3 will not be getting breaking changes, so it sounds like
this feature is here to stay.

Fixes #1927
Ref. #532, #410, #1806, #1770, #1628
This commit is contained in:
Mislav Marohnić 2018-12-28 07:52:45 +01:00
Родитель d51379494b
Коммит 2a748a048d
2 изменённых файлов: 8 добавлений и 11 удалений

Просмотреть файл

@ -10,7 +10,6 @@ import (
"github.com/github/hub/git"
"github.com/github/hub/github"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
)
@ -47,8 +46,12 @@ pull-request -i <ISSUE>
Further edit the contents of <FILE> in a text editor before submitting.
-i, --issue=<ISSUE>
(Deprecated) Convert an issue to a pull request. <ISSUE> may be an issue
number or a URL.
Convert an issue to a pull request. <ISSUE> may be an issue number or a URL.
You can only convert issues that you've opened or that which you have admin
rights over. In most workflows it isn't necessary to convert issues to pull
requests; you can simply reference the original issue in the body of the new
pull request.
-o, --browse
Open the new pull request in a web browser.
@ -443,10 +446,6 @@ of text is the title and the rest is the description.`, fullBase, fullHead))
}
}
if flagPullRequestIssue != "" {
ui.Errorln("Warning: Issue to pull request conversion is deprecated and might not work in the future.")
}
args.NoForward()
printBrowseOrCopy(args, pullRequestURL, flagPullRequestBrowse, flagPullRequestCopy)
}

Просмотреть файл

@ -669,8 +669,7 @@ Feature: hub pull-request
When I successfully run `hub pull-request -i 92`
Then the output should contain exactly:
"""
https://github.com/mislav/coral/pull/92
Warning: Issue to pull request conversion is deprecated and might not work in the future.\n
https://github.com/mislav/coral/pull/92\n
"""
Scenario: Convert issue URL to pull request
@ -686,8 +685,7 @@ Feature: hub pull-request
When I successfully run `hub pull-request https://github.com/mislav/coral/issues/92`
Then the output should contain exactly:
"""
https://github.com/mislav/coral/pull/92
Warning: Issue to pull request conversion is deprecated and might not work in the future.\n
https://github.com/mislav/coral/pull/92\n
"""
Scenario: Enterprise host