Adding support for event integration_installation_repositories
This commit is contained in:
+40
-39
@@ -28,44 +28,45 @@ type Event string
|
||||
|
||||
// GitHub hook types
|
||||
const (
|
||||
CheckRunEvent Event = "check_run"
|
||||
CheckSuiteEvent Event = "check_suite"
|
||||
CommitCommentEvent Event = "commit_comment"
|
||||
CreateEvent Event = "create"
|
||||
DeleteEvent Event = "delete"
|
||||
DeploymentEvent Event = "deployment"
|
||||
DeploymentStatusEvent Event = "deployment_status"
|
||||
ForkEvent Event = "fork"
|
||||
GollumEvent Event = "gollum"
|
||||
InstallationEvent Event = "installation"
|
||||
InstallationRepositoriesEvent Event = "installation_repositories"
|
||||
IntegrationInstallationEvent Event = "integration_installation"
|
||||
IssueCommentEvent Event = "issue_comment"
|
||||
IssuesEvent Event = "issues"
|
||||
LabelEvent Event = "label"
|
||||
MemberEvent Event = "member"
|
||||
MembershipEvent Event = "membership"
|
||||
MilestoneEvent Event = "milestone"
|
||||
OrganizationEvent Event = "organization"
|
||||
OrgBlockEvent Event = "org_block"
|
||||
PageBuildEvent Event = "page_build"
|
||||
PingEvent Event = "ping"
|
||||
ProjectCardEvent Event = "project_card"
|
||||
ProjectColumnEvent Event = "project_column"
|
||||
ProjectEvent Event = "project"
|
||||
PublicEvent Event = "public"
|
||||
PullRequestEvent Event = "pull_request"
|
||||
PullRequestReviewEvent Event = "pull_request_review"
|
||||
PullRequestReviewCommentEvent Event = "pull_request_review_comment"
|
||||
PushEvent Event = "push"
|
||||
ReleaseEvent Event = "release"
|
||||
RepositoryEvent Event = "repository"
|
||||
RepositoryVulnerabilityAlertEvent Event = "repository_vulnerability_alert"
|
||||
SecurityAdvisoryEvent Event = "security_advisory"
|
||||
StatusEvent Event = "status"
|
||||
TeamEvent Event = "team"
|
||||
TeamAddEvent Event = "team_add"
|
||||
WatchEvent Event = "watch"
|
||||
CheckRunEvent Event = "check_run"
|
||||
CheckSuiteEvent Event = "check_suite"
|
||||
CommitCommentEvent Event = "commit_comment"
|
||||
CreateEvent Event = "create"
|
||||
DeleteEvent Event = "delete"
|
||||
DeploymentEvent Event = "deployment"
|
||||
DeploymentStatusEvent Event = "deployment_status"
|
||||
ForkEvent Event = "fork"
|
||||
GollumEvent Event = "gollum"
|
||||
InstallationEvent Event = "installation"
|
||||
InstallationRepositoriesEvent Event = "installation_repositories"
|
||||
IntegrationInstallationEvent Event = "integration_installation"
|
||||
IntegrationInstallationRepositoriesEvent Event = "integration_installation_repositories"
|
||||
IssueCommentEvent Event = "issue_comment"
|
||||
IssuesEvent Event = "issues"
|
||||
LabelEvent Event = "label"
|
||||
MemberEvent Event = "member"
|
||||
MembershipEvent Event = "membership"
|
||||
MilestoneEvent Event = "milestone"
|
||||
OrganizationEvent Event = "organization"
|
||||
OrgBlockEvent Event = "org_block"
|
||||
PageBuildEvent Event = "page_build"
|
||||
PingEvent Event = "ping"
|
||||
ProjectCardEvent Event = "project_card"
|
||||
ProjectColumnEvent Event = "project_column"
|
||||
ProjectEvent Event = "project"
|
||||
PublicEvent Event = "public"
|
||||
PullRequestEvent Event = "pull_request"
|
||||
PullRequestReviewEvent Event = "pull_request_review"
|
||||
PullRequestReviewCommentEvent Event = "pull_request_review_comment"
|
||||
PushEvent Event = "push"
|
||||
ReleaseEvent Event = "release"
|
||||
RepositoryEvent Event = "repository"
|
||||
RepositoryVulnerabilityAlertEvent Event = "repository_vulnerability_alert"
|
||||
SecurityAdvisoryEvent Event = "security_advisory"
|
||||
StatusEvent Event = "status"
|
||||
TeamEvent Event = "team"
|
||||
TeamAddEvent Event = "team_add"
|
||||
WatchEvent Event = "watch"
|
||||
)
|
||||
|
||||
// EventSubtype defines a GitHub Hook Event subtype
|
||||
@@ -206,7 +207,7 @@ func (hook Webhook) Parse(r *http.Request, events ...Event) (interface{}, error)
|
||||
var pl InstallationPayload
|
||||
err = json.Unmarshal([]byte(payload), &pl)
|
||||
return pl, err
|
||||
case InstallationRepositoriesEvent:
|
||||
case InstallationRepositoriesEvent, IntegrationInstallationRepositoriesEvent:
|
||||
var pl InstallationRepositoriesPayload
|
||||
err = json.Unmarshal([]byte(payload), &pl)
|
||||
return pl, err
|
||||
|
||||
Reference in New Issue
Block a user