diff options
Diffstat (limited to 'vendor/github.com/google/go-github/github/pulls.go')
-rw-r--r-- | vendor/github.com/google/go-github/github/pulls.go | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/vendor/github.com/google/go-github/github/pulls.go b/vendor/github.com/google/go-github/github/pulls.go index 1f34469..a123ec5 100644 --- a/vendor/github.com/google/go-github/github/pulls.go +++ b/vendor/github.com/google/go-github/github/pulls.go @@ -62,6 +62,10 @@ type PullRequest struct { Head *PullRequestBranch `json:"head,omitempty"` Base *PullRequestBranch `json:"base,omitempty"` + + // ActiveLockReason is populated only when LockReason is provided while locking the pull request. + // Possible values are: "off-topic", "too heated", "resolved", and "spam". + ActiveLockReason *string `json:"active_lock_reason,omitempty"` } func (p PullRequest) String() string { @@ -119,7 +123,7 @@ func (s *PullRequestsService) List(ctx context.Context, owner string, repo strin } // TODO: remove custom Accept header when this API fully launches. - acceptHeaders := []string{mediaTypeGraphQLNodeIDPreview, mediaTypeLabelDescriptionSearchPreview} + acceptHeaders := []string{mediaTypeLabelDescriptionSearchPreview, mediaTypeLockReasonPreview} req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) var pulls []*PullRequest @@ -142,7 +146,7 @@ func (s *PullRequestsService) Get(ctx context.Context, owner string, repo string } // TODO: remove custom Accept header when this API fully launches. - acceptHeaders := []string{mediaTypeGraphQLNodeIDPreview, mediaTypeLabelDescriptionSearchPreview} + acceptHeaders := []string{mediaTypeLabelDescriptionSearchPreview, mediaTypeLockReasonPreview} req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) pull := new(PullRequest) @@ -201,8 +205,7 @@ func (s *PullRequestsService) Create(ctx context.Context, owner string, repo str } // TODO: remove custom Accept header when this API fully launches. - acceptHeaders := []string{mediaTypeGraphQLNodeIDPreview, mediaTypeLabelDescriptionSearchPreview} - req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) + req.Header.Set("Accept", mediaTypeLabelDescriptionSearchPreview) p := new(PullRequest) resp, err := s.client.Do(ctx, req, p) @@ -251,7 +254,7 @@ func (s *PullRequestsService) Edit(ctx context.Context, owner string, repo strin } // TODO: remove custom Accept header when this API fully launches. - acceptHeaders := []string{mediaTypeGraphQLNodeIDPreview, mediaTypeLabelDescriptionSearchPreview} + acceptHeaders := []string{mediaTypeLabelDescriptionSearchPreview, mediaTypeLockReasonPreview} req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) p := new(PullRequest) |