Go-github: Remove custom media type for Pull Request Reviews API

Created on 11 May 2017  路  13Comments  路  Source: google/go-github

The custom media type application/vnd.github.black-cat-preview+json can be removed from go-github as the "Pull Request Reviews API" is no longer in preview but has become official.

See GitHub Developer announcement:
https://developer.github.com/changes/2017-05-09-end-black-cat-preview/

Most helpful comment

@gmlewis please assign this to me

All 13 comments

@gmlewis please assign this to me

@gmlewis @shurcooL Pull Requests have three categories - Reviews, ReviewComments and Review Requests. Is this change required for all of them. The documentation points are reviews only.

I think it's all endpoints that currently set the custom application/vnd.github.black-cat-preview+json Accept header. They no longer need to.

This change breaks Enterprise users -- we don't have reviews out of preview yet :(.

Thanks for reporting @swsnider.

Re-opening for further consideration.

How should we go about dealing with this, @gmlewis?

A short term solution is to revert this removal of the preview API.

However, a long term solution is deciding on our policy. Should latest master target GitHub.com
API only, or GitHub.com and GitHub Enterprise APIs? The challenge with doing the latter from what I can see is that their API chances/announcements are more difficult to track down for Enterprise API. But maybe I haven't looked hard enough.

The problem is that even after the Enterprise version with this fixed is released, you're typically still at the mercy of your IT org to upgrade your instance in a timely manner, so this may not be soluble by this project :(.

Right. So it might be the case that a better/more viable solution is to, unfortunately, use an older version of go-github via vendoring.

Yeah, that's what I'm doing for now

I think the "good-for-beginners" label could be removed from this, unless there is a way for a random person like me to solve it?

I had a talk with @willnorris about this, and I believe our resolution was that semantic versioning (#376) would be the best way to support GitHub Enterprise API users (and that they would need to vendor the version that best supported their use-case), and that the latest master target the latest GitHub API.

As such, I think the "good-for-beginners" label still holds for this issue.

We can't help IT departments that are slow to upgrade, and vendoring (together with semver) is the right solution there.

But I kinda like the policy of not removing preview media types until they have been released in GitHub Enterprise (assuming we can track that without too much trouble). We could go ahead and create issues like this when APIs come out of preview for github.com, and apply a special issue label, but don't actually remove the code. Then, when the next GitHub Enterprise version is released, we go through the issues to see which ones we can remove. It's a little bit of manual work but it's only done periodically.

As such, I think the "good-for-beginners" label still holds for this issue.

Note, the original task of removing the media type has already been done in 11516601ad905b8307923d093a487b6a5446f2c4, @gmlewis. I've reopened the issue only to discuss the outcome regarding Enterprise not having support for this yet. Aside from discussion, this issue isn't actionable, so I'll remove that label.

It also sounds like we've come to a conclusion about the long term solution. Thanks @gmlewis and @willnorris. Further discussion about semver and tagging can be resumed in #376. I'll close this issue, but feel to continue discussion there, or open a new issue if there's something specific to address.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mungojam picture mungojam  路  3Comments

gmlewis picture gmlewis  路  3Comments

dmitshur picture dmitshur  路  3Comments

gmlewis picture gmlewis  路  3Comments

scriptonist picture scriptonist  路  3Comments