Skip to content
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

On the deprecation of issue to pull request conversion #532

Closed
cbeams opened this issue Mar 29, 2014 · 8 comments
Closed

On the deprecation of issue to pull request conversion #532

cbeams opened this issue Mar 29, 2014 · 8 comments

Comments

@cbeams
Copy link

cbeams commented Mar 29, 2014

I recently updated hub, and was dismayed to see this new warning introduced in 4f70dd1:

$ git pull-request -i 321
Warning: Issue to pull request conversion is deprecated and might not work in the future.
https://github.com/spring-io/sagan/pull/319

My team and I use issue-to-pull request conversion as a core part of our workflow. So useful is this feature that we call it out in our contributor guidelines, and incite developers to install hub on the merits of this functionality alone.

Issue to pull-request conversion is a great way to evolve all the way from a question to a discussion to a committed contribution, keeping everything in context in a single issue. It would be a shame to see it go. If anything, I'd hoped that this workflow might be further promoted to first class status in the web UI as well.

Can you expand on why this is being deprecated? I realize that hub is not responsible for this change, but is rather a decision being made at the API level. Who can I lobby to reconsider that change?

@cbeams
Copy link
Author

cbeams commented Mar 29, 2014

See this Stack Overflow thread, in which the questioner asks how one can change the base branch of a pull request—functionality I have also desired many times.

Related to the topic at hand, it seems that this useful feature was also once available in the API, but subsequently removed. Again I wonder: why?

@hkdobrev
Copy link

There is a big discussion about that here: 4f70dd1

cbeams referenced this issue Mar 30, 2014
This feature is likely to get dropped from GitHub API in the near
future. The alternative is to simply create a new pull-request and
reference the original issue in the description.
@mislav
Copy link
Owner

mislav commented Mar 30, 2014

Some hubbers on that thread weighted in on why we don't suggest using this API feature anymore. It might get removed in API v4 for the same reasons. Why support a feature that we don't condone using?

But this deprecation warning in hub is mostly my decision, despite the API itself continuing to be functional in v3. I don't want people using this feature, so I threw in a deprecation warning. I realize that some individuals/teams organized their workflows around this, and this is precisely why I decided to deprecate the feature with a warning on stderr: to motivate them to stop this practice and adjust their workflow in a way that it doesn't need converting issues to PRs.

So in the end, this debate is the battle of different workflows. Obviously, I and the other maintainers of hub will design it in a way that it discourages workflows that we consider harmful, even if you don't. You have options, though:

  1. You can continue to use hub and ignore the warning on stderr
  2. You can silence the warning on stderr by wrapping hub pull-request in a script
  3. You can fork hub for your team.
  4. You can code up your own script for making pull requests and distribute it with your project so all maintainers and contributors can use it. If it uses API v3, it's guaranteed that the conversion functionality will continue to be available to you.

@mislav mislav closed this as completed Mar 30, 2014
@abourget
Copy link

Why is it harmful ? Links ?

@mislav
Copy link
Owner

mislav commented Jul 21, 2014

@abourget 4f70dd1#commitcomment-5105733 (see my comments on that thread as well)

@alexchandel
Copy link

I get the error:

Error creating pull request: Unprocessable Entity (HTTP 422)
Not allowed to change field "issue"

when trying to do this. How do I force hub to use the v3 API? I do not want to waste another issue no, since A issue was created to update a URL, and A commit is required to do so.

Edit: There may have been confounding variables, but this was possibly fixed by checking out the head branch and/or putting the -h and -b arguments in quotes and/or completely specifying the [[owner/]repo:]branch syntax.

@mislav
Copy link
Owner

mislav commented Aug 10, 2015

@alexchandel hub uses and will continue to use the v3 API. I sounds like you worked around your issue. The initial validation failure that you've got might have been a misleading message; sorry about that.

mislav added a commit that referenced this issue Dec 28, 2018
5 years ago, in anticipation of an API change, I have made the call to
deprecate issue-to-PR conversion in hub. 4f70dd1

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
@mislav
Copy link
Owner

mislav commented Dec 28, 2018

The hub pull-request -i deprecation warning has been removed https://github.com/github/hub/releases/tag/v2.7.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants