diff --git a/github/event_types.go b/github/event_types.go index e2c37ca..4e2615e 100644 --- a/github/event_types.go +++ b/github/event_types.go @@ -301,14 +301,15 @@ func (p PushEvent) String() string { // PushEventCommit represents a git commit in a GitHub PushEvent. type PushEventCommit struct { - SHA *string `json:"sha,omitempty"` - Message *string `json:"message,omitempty"` - Author *CommitAuthor `json:"author,omitempty"` - URL *string `json:"url,omitempty"` - Distinct *bool `json:"distinct,omitempty"` - Added []string `json:"added,omitempty"` - Removed []string `json:"removed,omitempty"` - Modified []string `json:"modified,omitempty"` + SHA *string `json:"sha,omitempty"` + Message *string `json:"message,omitempty"` + Author *CommitAuthor `json:"author,omitempty"` + Committer *CommitAuthor `json:"committer,omitempty"` + URL *string `json:"url,omitempty"` + Distinct *bool `json:"distinct,omitempty"` + Added []string `json:"added,omitempty"` + Removed []string `json:"removed,omitempty"` + Modified []string `json:"modified,omitempty"` } func (p PushEventCommit) String() string { @@ -341,6 +342,10 @@ type PushEventRepository struct { DefaultBranch *string `json:"default_branch,omitempty"` MasterBranch *string `json:"master_branch,omitempty"` Organization *string `json:"organization,omitempty"` + + // The following fields are only populated by Webhook events. + URL *string `json:"url,omitempty"` + HTMLURL *string `json:"html_url,omitempty"` } // PushEventRepoOwner is a basic reporesntation of user/org in a PushEvent payload diff --git a/github/git_commits.go b/github/git_commits.go index 6584b77..41e7ff9 100644 --- a/github/git_commits.go +++ b/github/git_commits.go @@ -37,6 +37,9 @@ type CommitAuthor struct { Date *time.Time `json:"date,omitempty"` Name *string `json:"name,omitempty"` Email *string `json:"email,omitempty"` + + // The following fields are only populated by Webhook events. + Login *string `json:"username,omitempty"` // Renamed for go-github consistency. } func (c CommitAuthor) String() string { diff --git a/github/repos_deployments.go b/github/repos_deployments.go index fea43de..c7beb4b 100644 --- a/github/repos_deployments.go +++ b/github/repos_deployments.go @@ -103,7 +103,9 @@ func (s *RepositoriesService) CreateDeployment(owner, repo string, request *Depl // DeploymentStatus represents the status of a // particular deployment. type DeploymentStatus struct { - ID *int `json:"id,omitempty"` + ID *int `json:"id,omitempty"` + // State is the deployment state. + // Possible values are: "pending", "success", "failure", "error". State *string `json:"state,omitempty"` Creator *User `json:"creator,omitempty"` Description *string `json:"description,omitempty"`