Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions github/event_types.go
Original file line numberDiff line numberDiff line change
Expand Up@@ -76,6 +76,10 @@ type CommitCommentEvent struct {
Repo *Repository `json:"repository,omitempty"`
Sender *User `json:"sender,omitempty"`
Installation *Installation `json:"installation,omitempty"`

// The following field is only present when the webhook is triggered on
// a repository belonging to an organization.
Org *Organization `json:"organization,omitempty"`
}

// ContentReferenceEvent is triggered when the body or comment of an issue or
Expand DownExpand Up@@ -132,6 +136,10 @@ type DeleteEvent struct {
Repo *Repository `json:"repository,omitempty"`
Sender *User `json:"sender,omitempty"`
Installation *Installation `json:"installation,omitempty"`

// The following field is only present when the webhook is triggered on
// a repository belonging to an organization.
Org *Organization `json:"organization,omitempty"`
}

// DependabotAlertEvent is triggered when there is activity relating to Dependabot alerts.
Expand DownExpand Up@@ -192,6 +200,10 @@ type DeploymentEvent struct {
// The following fields are only populated by Webhook events.
Sender *User `json:"sender,omitempty"`
Installation *Installation `json:"installation,omitempty"`

// The following field is only present when the webhook is triggered on
// a repository belonging to an organization.
Org *Organization `json:"organization,omitempty"`
}

// DeploymentProtectionRuleEvent represents a deployment protection rule event.
Expand DownExpand Up@@ -227,6 +239,10 @@ type DeploymentStatusEvent struct {
// The following fields are only populated by Webhook events.
Sender *User `json:"sender,omitempty"`
Installation *Installation `json:"installation,omitempty"`

// The following field is only present when the webhook is triggered on
// a repository belonging to an organization.
Org *Organization `json:"organization,omitempty"`
}

// DiscussionCommentEvent represents a webhook event for a comment on discussion.
Expand DownExpand Up@@ -363,6 +379,10 @@ type GollumEvent struct {
Repo *Repository `json:"repository,omitempty"`
Sender *User `json:"sender,omitempty"`
Installation *Installation `json:"installation,omitempty"`

// The following field is only present when the webhook is triggered on
// a repository belonging to an organization.
Org *Organization `json:"organization,omitempty"`
}

// EditChange represents the changes when an issue, pull request, comment,
Expand DownExpand Up@@ -510,6 +530,10 @@ type InstallationEvent struct {
Sender *User `json:"sender,omitempty"`
Installation *Installation `json:"installation,omitempty"`
Requester *User `json:"requester,omitempty"`

// The following field is only present when the webhook is triggered on
// a repository belonging to an organization.
Org *Organization `json:"organization,omitempty"`
}

// InstallationRepositoriesEvent is triggered when a repository is added or
Expand All@@ -524,6 +548,10 @@ type InstallationRepositoriesEvent struct {
RepositorySelection *string `json:"repository_selection,omitempty"`
Sender *User `json:"sender,omitempty"`
Installation *Installation `json:"installation,omitempty"`

// The following field is only present when the webhook is triggered on
// a repository belonging to an organization.
Org *Organization `json:"organization,omitempty"`
}

// InstallationLoginChange represents a change in login on an installation.
Expand DownExpand Up@@ -603,6 +631,10 @@ type IssuesEvent struct {
Sender *User `json:"sender,omitempty"`
Installation *Installation `json:"installation,omitempty"`
Milestone *Milestone `json:"milestone,omitempty"`

// The following field is only present when the webhook is triggered on
// a repository belonging to an organization.
Org *Organization `json:"organization,omitempty"`
}

// LabelEvent is triggered when a repository's label is created, edited, or deleted.
Expand DownExpand Up@@ -639,6 +671,10 @@ type MarketplacePurchaseEvent struct {
PreviousMarketplacePurchase *MarketplacePurchase `json:"previous_marketplace_purchase,omitempty"`
Sender *User `json:"sender,omitempty"`
Installation *Installation `json:"installation,omitempty"`

// The following field is only present when the webhook is triggered on
// a repository belonging to an organization.
Org *Organization `json:"organization,omitempty"`
}

// MemberEvent is triggered when a user is added as a collaborator to a repository.
Expand All@@ -654,6 +690,10 @@ type MemberEvent struct {
Repo *Repository `json:"repository,omitempty"`
Sender *User `json:"sender,omitempty"`
Installation *Installation `json:"installation,omitempty"`

// The following field is only present when the webhook is triggered on
// a repository belonging to an organization.
Org *Organization `json:"organization,omitempty"`
}

// MembershipEvent is triggered when a user is added or removed from a team.
Expand DownExpand Up@@ -825,6 +865,10 @@ type PageBuildEvent struct {
Repo *Repository `json:"repository,omitempty"`
Sender *User `json:"sender,omitempty"`
Installation *Installation `json:"installation,omitempty"`

// The following field is only present when the webhook is triggered on
// a repository belonging to an organization.
Org *Organization `json:"organization,omitempty"`
}

// PersonalAccessTokenRequestEvent occurs when there is activity relating to a
Expand DownExpand Up@@ -885,6 +929,10 @@ type PersonalAccessTokenRequest struct {

// Date and time when the associated fine-grained personal access token was last used for authentication.
TokenLastUsedAt *Timestamp `json:"token_last_used_at,omitempty"`

// The following field is only present when the webhook is triggered on
// a repository belonging to an organization.
Org *Organization `json:"organization,omitempty"`
}

// PersonalAccessTokenPermissions represents the original or newly requested
Expand DownExpand Up@@ -1044,6 +1092,10 @@ type PublicEvent struct {
Repo *Repository `json:"repository,omitempty"`
Sender *User `json:"sender,omitempty"`
Installation *Installation `json:"installation,omitempty"`

// The following field is only present when the webhook is triggered on
// a repository belonging to an organization.
Org *Organization `json:"organization,omitempty"`
}

// PullRequestEvent is triggered when a pull request is assigned, unassigned, labeled,
Expand DownExpand Up@@ -1126,6 +1178,10 @@ type PullRequestReviewCommentEvent struct {
Repo *Repository `json:"repository,omitempty"`
Sender *User `json:"sender,omitempty"`
Installation *Installation `json:"installation,omitempty"`

// The following field is only present when the webhook is triggered on
// a repository belonging to an organization.
Org *Organization `json:"organization,omitempty"`
}

// PullRequestReviewThreadEvent is triggered when a comment made as part of a
Expand All@@ -1144,6 +1200,10 @@ type PullRequestReviewThreadEvent struct {
Repo *Repository `json:"repository,omitempty"`
Sender *User `json:"sender,omitempty"`
Installation *Installation `json:"installation,omitempty"`

// The following field is only present when the webhook is triggered on
// a repository belonging to an organization.
Org *Organization `json:"organization,omitempty"`
}

// PullRequestTargetEvent is triggered when a pull request is assigned, unassigned, labeled,
Expand DownExpand Up@@ -1309,6 +1369,10 @@ type ReleaseEvent struct {
Repo *Repository `json:"repository,omitempty"`
Sender *User `json:"sender,omitempty"`
Installation *Installation `json:"installation,omitempty"`

// The following field is only present when the webhook is triggered on
// a repository belonging to an organization.
Org *Organization `json:"organization,omitempty"`
}

// RepositoryEvent is triggered when a repository is created, archived, unarchived,
Expand DownExpand Up@@ -1379,6 +1443,10 @@ type RepositoryVulnerabilityAlertEvent struct {

// The user that triggered the event.
Sender *User `json:"sender,omitempty"`

// The following field is only present when the webhook is triggered on
// a repository belonging to an organization.
Org *Organization `json:"organization,omitempty"`
}

// RepositoryVulnerabilityAlert represents a repository security alert.
Expand DownExpand Up@@ -1485,6 +1553,10 @@ type StatusEvent struct {
Repo *Repository `json:"repository,omitempty"`
Sender *User `json:"sender,omitempty"`
Installation *Installation `json:"installation,omitempty"`

// The following field is only present when the webhook is triggered on
// a repository belonging to an organization.
Org *Organization `json:"organization,omitempty"`
}

// TeamEvent is triggered when an organization's team is created, modified or deleted.
Expand DownExpand Up@@ -1555,6 +1627,10 @@ type WatchEvent struct {
Repo *Repository `json:"repository,omitempty"`
Sender *User `json:"sender,omitempty"`
Installation *Installation `json:"installation,omitempty"`

// The following field is only present when the webhook is triggered on
// a repository belonging to an organization.
Org *Organization `json:"organization,omitempty"`
}

// WorkflowDispatchEvent is triggered when someone triggers a workflow run on GitHub or
Expand Down
Loading