+
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
2 changes: 2 additions & 0 deletions github/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ func (e *Event) ParsePayload() (payload interface{}, err error) {
payload = &DeployKeyEvent{}
case "DeploymentEvent":
payload = &DeploymentEvent{}
case "DeploymentProtectionRuleEvent":
payload = &DeploymentProtectionRuleEvent{}
case "DeploymentStatusEvent":
payload = &DeploymentStatusEvent{}
case "DiscussionEvent":
Expand Down
19 changes: 19 additions & 0 deletions github/event_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,25 @@ type DeploymentEvent struct {
Installation *Installation `json:"installation,omitempty"`
}

// DeploymentProtectionRuleEvent represents a deployment protection rule event.
// The Webhook event name is "deployment_protection_rule".
//
// GitHub API docs: https://docs.github.com/webhooks-and-events/webhooks/webhook-events-and-payloads#deployment_protection_rule
type DeploymentProtectionRuleEvent struct {
Action *string `json:"action,omitempty"`
Environment *string `json:"environment,omitempty"`
Event *string `json:"event,omitempty"`

// The URL Github provides for a third-party to use in order to pass/fail a deployment gate
DeploymentCallbackURL *string `json:"deployment_callback_url,omitempty"`
Deployment *Deployment `json:"deployment,omitempty"`
Repo *Repository `json:"repository,omitempty"`
Organization *Organization `json:"organization,omitempty"`
PullRequests []*PullRequest `json:"pull_requests,omitempty"`
Sender *User `json:"sender,omitempty"`
Installation *Installation `json:"installation,omitempty"`
}

// DeploymentStatusEvent represents a deployment status.
// The Webhook event name is "deployment_status".
//
Expand Down
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载