diff --git a/pkg/cmd/factory/http.go b/pkg/cmd/factory/http.go index 0c0abd7b2..28dac1ed6 100644 --- a/pkg/cmd/factory/http.go +++ b/pkg/cmd/factory/http.go @@ -113,6 +113,7 @@ func NewHTTPClient(io *iostreams.IOStreams, cfg configGetter, appVersion string, opts = append(opts, api.AddHeaderFunc("Accept", func(req *http.Request) (string, error) { accept := "application/vnd.github.merge-info-preview+json" // PullRequest.mergeStateStatus + accept += ", application/vnd.github.nebula-preview" // visibility when RESTing repos into an org if ghinstance.IsEnterprise(getHost(req)) { accept += ", application/vnd.github.antiope-preview" // Commit.statusCheckRollup accept += ", application/vnd.github.shadow-cat-preview" // PullRequest.isDraft diff --git a/pkg/cmd/factory/http_test.go b/pkg/cmd/factory/http_test.go index ae4096594..b02a914f8 100644 --- a/pkg/cmd/factory/http_test.go +++ b/pkg/cmd/factory/http_test.go @@ -39,7 +39,7 @@ func TestNewHTTPClient(t *testing.T) { wantHeader: map[string]string{ "authorization": "token MYTOKEN", "user-agent": "GitHub CLI v1.2.3", - "accept": "application/vnd.github.merge-info-preview+json", + "accept": "application/vnd.github.merge-info-preview+json, application/vnd.github.nebula-preview", }, wantStderr: "", }, @@ -69,7 +69,7 @@ func TestNewHTTPClient(t *testing.T) { wantHeader: map[string]string{ "authorization": "", "user-agent": "GitHub CLI v1.2.3", - "accept": "application/vnd.github.merge-info-preview+json", + "accept": "application/vnd.github.merge-info-preview+json, application/vnd.github.nebula-preview", }, wantStderr: "", }, @@ -85,14 +85,14 @@ func TestNewHTTPClient(t *testing.T) { wantHeader: map[string]string{ "authorization": "token MYTOKEN", "user-agent": "GitHub CLI v1.2.3", - "accept": "application/vnd.github.merge-info-preview+json", + "accept": "application/vnd.github.merge-info-preview+json, application/vnd.github.nebula-preview", }, wantStderr: heredoc.Doc(` * Request at