Skip to content

Commit

Permalink
Apps manifest now uses mediaTypeV3
Browse files Browse the repository at this point in the history
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
  • Loading branch information
chmouel committed Apr 26, 2021
1 parent cceb4d4 commit a7a6816
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions github/apps_manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion github/apps_manifest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})

Expand Down

0 comments on commit a7a6816

Please sign in to comment.