delete custom media type 'application/vnd.github.polaris-preview' #621
Merged
Merged
Conversation
76dd0e7 to
2d7aed2
Compare
dmitshur
reviewed
Apr 21, 2017
| // https://developer.github.com/v3/licenses/#get-a-repositorys-license | ||
| acceptHeaders := []string{mediaTypeLicensesPreview, mediaTypeSquashPreview} | ||
| acceptHeaders := []string{mediaTypeLicensesPreview} | ||
| req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) |
Member
There was a problem hiding this comment.
Given there's only one accept header value being set now, this can be simplified to just:
req.Header.Set("Accept", mediaTypeLicensesPreview)How do you feel about that?
| acceptHeader := []string{mediaTypeLicensesPreview} | ||
| mux.HandleFunc("/repos/o/r", func(w http.ResponseWriter, r *http.Request) { | ||
| testMethod(t, r, "GET") | ||
| testHeader(t, r, "Accept", strings.Join(acceptHeader, ", ")) |
Member
There was a problem hiding this comment.
This too can be simplified to just:
testHeader(t, r, "Accept", mediaTypeLicensesPreview)
Member
|
Friendly ping @ahmedhagii. Did you see my review question above? |
Member
|
Friendly ping @ahmedhagii. If you prefer not to continue working on this, we can take this PR (which is 90% there), apply the suggested change above, and merge it. That's completely okay. |
Member
|
I'm going to apply the suggested simplifications myself. |
The Merge Methods API has become an official part of GitHub API v3, so the 'application/vnd.github.polaris-preview' preview API media type is no longer needed. GitHub Announcement: https://developer.github.com/changes/2017-04-07-end-merge-methods-api-preview/ Fixes google#616.
2d7aed2 to
59ae030
Compare
Member
|
The simplifications were no longer applicable due to the changes that have since happened. I've rebased, resolved the merge conflict, improved the commit message, and updated the PR. |
nbareil
pushed a commit
to nbareil/go-github
that referenced
this pull request
May 1, 2018
The Merge Methods API has become an official part of GitHub API v3, so the 'application/vnd.github.polaris-preview' preview API media type is no longer needed. GitHub Announcement: https://developer.github.com/changes/2017-04-07-end-merge-methods-api-preview/ Fixes google#616.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes issue: #616