Last active
March 13, 2017 13:14
-
-
Save ce222pc/6974f33e443fc1cb8c74665ae99f9511 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const hookNames = [ | |
"commit_comment", | |
"create", | |
"delete", | |
"deployment", | |
"deployment_status", | |
"download", | |
"follow", | |
"fork", | |
"fork_apply", | |
"gist", | |
"gollum", | |
"issue_comment", | |
"issues", | |
"label", | |
"member", | |
"membership", | |
"milestone", | |
"organization", | |
"org_block", | |
"page_build", | |
"project_card", | |
"project_column", | |
"project", | |
"public", | |
"pull_request", | |
"pull_request_review", | |
"pull_request_review_comment", | |
"push", | |
"release", | |
"repository", | |
"status", | |
"team", | |
"team_add", | |
"watch" | |
]; | |
const eventNames = [ | |
"CommitCommentEvent", | |
"CreateEvent", | |
"DeleteEvent", | |
"DeploymentEvent", | |
"DeploymentStatusEvent", | |
"DownloadEvent", | |
"FollowEvent", | |
"ForkEvent", | |
"ForkApplyEvent", | |
"GistEvent", | |
"GollumEvent", | |
"IssueCommentEvent", | |
"IssuesEvent", | |
"LabelEvent", | |
"MemberEvent", | |
"MembershipEvent", | |
"MilestoneEvent", | |
"OrganizationEvent", | |
"OrgBlockEvent", | |
"PageBuildEvent", | |
"ProjectCardEvent", | |
"ProjectColumnEvent", | |
"ProjectEvent", | |
"PublicEvent", | |
"PullRequestEvent", | |
"PullRequestReviewEvent", | |
"PullRequestReviewCommentEvent", | |
"PushEvent", | |
"ReleaseEvent", | |
"RepositoryEvent", | |
"StatusEvent", | |
"TeamEvent", | |
"TeamAddEvent", | |
"WatchEvent" | |
]; | |
const hookToEventName = new Map(hookNames.map((hookName, index, arr) => [hookName, eventNames[index]])); | |
const eventToHookName = new Map(eventNames.map((eventName, index, arr) => [eventName, hookNames[index]])); | |
module.exports = { | |
hookNames, | |
eventNames, | |
hookToEventName, | |
eventToHookName | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment