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

Remove obsolete apps manifest preview custom header #1858

Merged
merged 1 commit into from
Apr 29, 2021

Conversation

chmouel
Copy link
Contributor

@chmouel chmouel commented Apr 26, 2021

Apps manifest are now out of preview and uses mediaTypeV3:

https://docs.github.com/en/rest/reference/apps#create-a-github-app-from-a-manifest

@google-cla google-cla bot added the cla: yes Indication that the PR author has signed a Google Contributor License Agreement. label Apr 26, 2021
@chmouel chmouel force-pushed the apps-manifest-mediaTypeV3 branch from e9da9b3 to a7a6816 Compare April 26, 2021 16:22
@@ -41,7 +37,7 @@ func (s *AppsService) CompleteAppManifest(ctx context.Context, code string) (*Ap
if err != nil {
return nil, nil, err
}
req.Header.Set("Accept", mediaTypeAppManifestPreview)
req.Header.Set("Accept", mediaTypeV3)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this line, as this header is added to all requests here:
https://github.com/google/go-github/blob/master/github/github.go#L383

@chmouel chmouel force-pushed the apps-manifest-mediaTypeV3 branch from a7a6816 to 3037c66 Compare April 27, 2021 09:56
@codecov
Copy link

codecov bot commented Apr 27, 2021

Codecov Report

Merging #1858 (7f40182) into master (cceb4d4) will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1858      +/-   ##
==========================================
- Coverage   97.64%   97.64%   -0.01%     
==========================================
  Files         105      105              
  Lines        6764     6763       -1     
==========================================
- Hits         6605     6604       -1     
  Misses         86       86              
  Partials       73       73              
Impacted Files Coverage Δ
github/apps_manifest.go 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cceb4d4...7f40182. Read the comment docs.

@@ -30,7 +30,7 @@ func TestGetConfig(t *testing.T) {

mux.HandleFunc("/app-manifests/code/conversions", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "POST")
testHeader(t, r, "Accept", mediaTypeAppManifestPreview)
testHeader(t, r, "Accept", mediaTypeV3)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's please also remove this line for conformity with the rest of the repo.

@chmouel chmouel force-pushed the apps-manifest-mediaTypeV3 branch from 3037c66 to 7f40182 Compare April 27, 2021 12:31
Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @chmouel !
LGTM.

Awaiting second LGTM before merging.

@gmlewis
Copy link
Collaborator

gmlewis commented Apr 27, 2021

For future PRs, please do not use force push in this repo. See CONTRIBUTING.md for details. Thanks.

@gmlewis gmlewis requested a review from wesleimp April 27, 2021 13:03
Copy link
Collaborator

@wesleimp wesleimp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💙

@gmlewis
Copy link
Collaborator

gmlewis commented Apr 29, 2021

Thank you, @wesleimp !
Merging.

@gmlewis
Copy link
Collaborator

gmlewis commented Apr 29, 2021

@bluekeyes - it just dawned on me... do you need to keep this preview header around for GitHub Enterprise before I merge this?

@bluekeyes
Copy link
Contributor

@gmlewis thanks for checking, I think this is probably fine. The GitHub docs for the supported enterprise versions don't reference this header (not that it's a great guarantee the header is unused) and I've personally never used this endpoint with the instances I maintain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Indication that the PR author has signed a Google Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants