From a7a6816793e1c1f71b58f39c10c6fc5fb9136879 Mon Sep 17 00:00:00 2001 From: Chmouel Boudjnah Date: Mon, 26 Apr 2021 18:17:38 +0200 Subject: [PATCH] Apps manifest now uses mediaTypeV3 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 --- github/apps_manifest.go | 6 +----- github/apps_manifest_test.go | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/github/apps_manifest.go b/github/apps_manifest.go index 007decf3198..e214a141b47 100644 --- a/github/apps_manifest.go +++ b/github/apps_manifest.go @@ -10,10 +10,6 @@ import ( "fmt" ) -const ( - mediaTypeAppManifestPreview = "application/vnd.github.fury-preview+json" -) - // AppConfig describes the configuration of a GitHub App. type AppConfig struct { ID *int64 `json:"id,omitempty"` @@ -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) cfg := new(AppConfig) resp, err := s.client.Do(ctx, req, cfg) diff --git a/github/apps_manifest_test.go b/github/apps_manifest_test.go index 461bb8d64c5..b2151903786 100644 --- a/github/apps_manifest_test.go +++ b/github/apps_manifest_test.go @@ -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) fmt.Fprint(w, manifestJSON) })