aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/google/go-github/github/event_types.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/google/go-github/github/event_types.go')
-rw-r--r--vendor/github.com/google/go-github/github/event_types.go65
1 files changed, 65 insertions, 0 deletions
diff --git a/vendor/github.com/google/go-github/github/event_types.go b/vendor/github.com/google/go-github/github/event_types.go
index 16f89b0..a1ffa69 100644
--- a/vendor/github.com/google/go-github/github/event_types.go
+++ b/vendor/github.com/google/go-github/github/event_types.go
@@ -209,6 +209,22 @@ type IssuesEvent struct {
Sender *User `json:"sender,omitempty"`
}
+// LabelEvent is triggered when a repository's label is created, edited, or deleted.
+// The Webhook event name is "label"
+//
+// GitHub docs: https://developer.github.com/v3/activity/events/types/#labelevent
+type LabelEvent struct {
+ // Action is the action that was performed. Possible values are:
+ // "created", "edited", "deleted"
+ Action *string `json:"action,omitempty"`
+ Label *Label `json:"label,omitempty"`
+
+ // The following fields are only populated by Webhook events.
+ Changes *EditChange `json:"changes,omitempty"`
+ Repo *Repository `json:"repository,omitempty"`
+ Org *Organization `json:"organization,omitempty"`
+}
+
// MemberEvent is triggered when a user is added as a collaborator to a repository.
// The Webhook event name is "member".
//
@@ -243,6 +259,23 @@ type MembershipEvent struct {
Sender *User `json:"sender,omitempty"`
}
+// MilestoneEvent is triggered when a milestone is created, closed, opened, edited, or deleted.
+// The Webhook event name is "milestone".
+//
+// Github docs: https://developer.github.com/v3/activity/events/types/#milestoneevent
+type MilestoneEvent struct {
+ // Action is the action that was performed. Possible values are:
+ // "created", "closed", "opened", "edited", "deleted"
+ Action *string `json:"action,omitempty"`
+ Milestone *Milestone `json:"milestone,omitempty"`
+
+ // The following fields are only populated by Webhook events.
+ Changes *EditChange `json:"changes,omitempty"`
+ Repo *Repository `json:"repository,omitempty"`
+ Sender *User `json:"sender,omitempty"`
+ Org *Organization `json:"organization,omitempty"`
+}
+
// PageBuildEvent represents an attempted build of a GitHub Pages site, whether
// successful or not.
// The Webhook event name is "page_build".
@@ -262,6 +295,18 @@ type PageBuildEvent struct {
Sender *User `json:"sender,omitempty"`
}
+// PingEvent is triggered when a Webhook is added to GitHub.
+//
+// GitHub docs: https://developer.github.com/webhooks/#ping-event
+type PingEvent struct {
+ // Random string of GitHub zen.
+ Zen *string `json:"zen,omitempty"`
+ // The ID of the webhook that triggered the ping.
+ HookID *int `json:"hook_id,omitempty"`
+ // The webhook configuration.
+ Hook *Hook `json:"hook,omitempty"`
+}
+
// PublicEvent is triggered when a private repository is open sourced.
// According to GitHub: "Without a doubt: the best GitHub event."
// The Webhook event name is "public".
@@ -294,6 +339,26 @@ type PullRequestEvent struct {
Sender *User `json:"sender,omitempty"`
}
+// PullRequestReviewEvent is triggered when a review is submitted on a pull
+// request.
+// The Webhook event name is "pull_request_review".
+//
+// GitHub docs: https://developer.github.com/v3/activity/events/types/#pullrequestreviewevent
+type PullRequestReviewEvent struct {
+ // Action is always "submitted".
+ Action *string `json:"action,omitempty"`
+ Review *PullRequestReview `json:"review,omitempty"`
+ PullRequest *PullRequest `json:"pull_request,omitempty"`
+
+ // The following fields are only populated by Webhook events.
+ Repo *Repository `json:"repository,omitempty"`
+ Sender *User `json:"sender,omitempty"`
+
+ // The following field is only present when the webhook is triggered on
+ // a repository belonging to an organization.
+ Organization *Organization `json:"organization,omitempty"`
+}
+
// PullRequestReviewCommentEvent is triggered when a comment is created on a
// portion of the unified diff of a pull request.
// The Webhook event name is "pull_request_review_comment".