aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/google/go-github/github/repos_deployments.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/google/go-github/github/repos_deployments.go')
-rw-r--r--vendor/github.com/google/go-github/github/repos_deployments.go19
1 files changed, 3 insertions, 16 deletions
diff --git a/vendor/github.com/google/go-github/github/repos_deployments.go b/vendor/github.com/google/go-github/github/repos_deployments.go
index 1300f05..794c323 100644
--- a/vendor/github.com/google/go-github/github/repos_deployments.go
+++ b/vendor/github.com/google/go-github/github/repos_deployments.go
@@ -9,7 +9,6 @@ import (
"context"
"encoding/json"
"fmt"
- "strings"
)
// Deployment represents a deployment in a repo
@@ -76,9 +75,6 @@ func (s *RepositoriesService) ListDeployments(ctx context.Context, owner, repo s
return nil, nil, err
}
- // TODO: remove custom Accept header when this API fully launches.
- req.Header.Set("Accept", mediaTypeGraphQLNodeIDPreview)
-
var deployments []*Deployment
resp, err := s.client.Do(ctx, req, &deployments)
if err != nil {
@@ -99,9 +95,6 @@ func (s *RepositoriesService) GetDeployment(ctx context.Context, owner, repo str
return nil, nil, err
}
- // TODO: remove custom Accept header when this API fully launches.
- req.Header.Set("Accept", mediaTypeGraphQLNodeIDPreview)
-
deployment := new(Deployment)
resp, err := s.client.Do(ctx, req, deployment)
if err != nil {
@@ -123,8 +116,7 @@ func (s *RepositoriesService) CreateDeployment(ctx context.Context, owner, repo
}
// TODO: remove custom Accept headers when APIs fully launch.
- acceptHeaders := []string{mediaTypeDeploymentStatusPreview, mediaTypeGraphQLNodeIDPreview}
- req.Header.Set("Accept", strings.Join(acceptHeaders, ", "))
+ req.Header.Set("Accept", mediaTypeDeploymentStatusPreview)
d := new(Deployment)
resp, err := s.client.Do(ctx, req, d)
@@ -176,9 +168,6 @@ func (s *RepositoriesService) ListDeploymentStatuses(ctx context.Context, owner,
return nil, nil, err
}
- // TODO: remove custom Accept header when this API fully launches.
- req.Header.Set("Accept", mediaTypeGraphQLNodeIDPreview)
-
var statuses []*DeploymentStatus
resp, err := s.client.Do(ctx, req, &statuses)
if err != nil {
@@ -200,8 +189,7 @@ func (s *RepositoriesService) GetDeploymentStatus(ctx context.Context, owner, re
}
// TODO: remove custom Accept headers when APIs fully launch.
- acceptHeaders := []string{mediaTypeDeploymentStatusPreview, mediaTypeGraphQLNodeIDPreview}
- req.Header.Set("Accept", strings.Join(acceptHeaders, ", "))
+ req.Header.Set("Accept", mediaTypeDeploymentStatusPreview)
d := new(DeploymentStatus)
resp, err := s.client.Do(ctx, req, d)
@@ -224,8 +212,7 @@ func (s *RepositoriesService) CreateDeploymentStatus(ctx context.Context, owner,
}
// TODO: remove custom Accept headers when APIs fully launch.
- acceptHeaders := []string{mediaTypeDeploymentStatusPreview, mediaTypeGraphQLNodeIDPreview}
- req.Header.Set("Accept", strings.Join(acceptHeaders, ", "))
+ req.Header.Set("Accept", mediaTypeDeploymentStatusPreview)
d := new(DeploymentStatus)
resp, err := s.client.Do(ctx, req, d)