aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/google/go-github/github/git_commits.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/google/go-github/github/git_commits.go')
-rw-r--r--vendor/github.com/google/go-github/github/git_commits.go28
1 files changed, 20 insertions, 8 deletions
diff --git a/vendor/github.com/google/go-github/github/git_commits.go b/vendor/github.com/google/go-github/github/git_commits.go
index 41e7ff9..0bcad41 100644
--- a/vendor/github.com/google/go-github/github/git_commits.go
+++ b/vendor/github.com/google/go-github/github/git_commits.go
@@ -10,16 +10,25 @@ import (
"time"
)
+// SignatureVerification represents GPG signature verification.
+type SignatureVerification struct {
+ Verified *bool `json:"verified,omitempty"`
+ Reason *string `json:"reason,omitempty"`
+ Signature *string `json:"signature,omitempty"`
+ Payload *string `json:"payload,omitempty"`
+}
+
// Commit represents a GitHub commit.
type Commit struct {
- SHA *string `json:"sha,omitempty"`
- Author *CommitAuthor `json:"author,omitempty"`
- Committer *CommitAuthor `json:"committer,omitempty"`
- Message *string `json:"message,omitempty"`
- Tree *Tree `json:"tree,omitempty"`
- Parents []Commit `json:"parents,omitempty"`
- Stats *CommitStats `json:"stats,omitempty"`
- URL *string `json:"url,omitempty"`
+ SHA *string `json:"sha,omitempty"`
+ Author *CommitAuthor `json:"author,omitempty"`
+ Committer *CommitAuthor `json:"committer,omitempty"`
+ Message *string `json:"message,omitempty"`
+ Tree *Tree `json:"tree,omitempty"`
+ Parents []Commit `json:"parents,omitempty"`
+ Stats *CommitStats `json:"stats,omitempty"`
+ URL *string `json:"url,omitempty"`
+ Verification *SignatureVerification `json:"verification,omitempty"`
// CommentCount is the number of GitHub comments on the commit. This
// is only populated for requests that fetch GitHub data like
@@ -56,6 +65,9 @@ func (s *GitService) GetCommit(owner string, repo string, sha string) (*Commit,
return nil, nil, err
}
+ // TODO: remove custom Accept header when this API fully launches.
+ req.Header.Set("Accept", mediaTypeGitSigningPreview)
+
c := new(Commit)
resp, err := s.client.Do(req, c)
if err != nil {