Add the verification payload in commits.

Follow :
- https://developer.github.com/v3/git/commits/
- https://developer.github.com/v3/repos/commits/
This commit is contained in:
Antoine GIRARD 2017-03-08 18:20:36 +01:00
parent 8807a1d2ce
commit 9da3bab000
No known key found for this signature in database
GPG key ID: AE8255B8A0D828E4

View file

@ -142,9 +142,18 @@ type PayloadCommit struct {
URL string `json:"url"` URL string `json:"url"`
Author *PayloadUser `json:"author"` Author *PayloadUser `json:"author"`
Committer *PayloadUser `json:"committer"` Committer *PayloadUser `json:"committer"`
Verification *PayloadCommitVerification `json:"verification"`
Timestamp time.Time `json:"timestamp"` Timestamp time.Time `json:"timestamp"`
} }
// PayloadCommitVerification represent the GPG verification part of a commit. FIXME: like PayloadCommit consider use same format as API when commits API are added.
type PayloadCommitVerification struct {
Verified bool `json:"verified"`
Reason string `json:"reason"`
Signature string `json:"signature"`
Payload string `json:"payload"`
}
var ( var (
_ Payloader = &CreatePayload{} _ Payloader = &CreatePayload{}
_ Payloader = &PushPayload{} _ Payloader = &PushPayload{}