mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
update some dependencies (#208)
* update some dependencies * some more * add these * remove things? * regen
This commit is contained in:
75
vendor/github.com/google/go-github/github/messages.go
generated
vendored
75
vendor/github.com/google/go-github/github/messages.go
generated
vendored
@ -33,42 +33,46 @@ const (
|
||||
signatureHeader = "X-Hub-Signature"
|
||||
// eventTypeHeader is the GitHub header key used to pass the event type.
|
||||
eventTypeHeader = "X-Github-Event"
|
||||
// deliveryIDHeader is the GitHub header key used to pass the unique ID for the webhook event.
|
||||
deliveryIDHeader = "X-Github-Delivery"
|
||||
)
|
||||
|
||||
var (
|
||||
// eventTypeMapping maps webhooks types to their corresponding go-github struct types.
|
||||
eventTypeMapping = map[string]string{
|
||||
"commit_comment": "CommitCommentEvent",
|
||||
"create": "CreateEvent",
|
||||
"delete": "DeleteEvent",
|
||||
"deployment": "DeploymentEvent",
|
||||
"deployment_status": "DeploymentStatusEvent",
|
||||
"fork": "ForkEvent",
|
||||
"gollum": "GollumEvent",
|
||||
"integration_installation": "IntegrationInstallationEvent",
|
||||
"integration_installation_repositories": "IntegrationInstallationRepositoriesEvent",
|
||||
"issue_comment": "IssueCommentEvent",
|
||||
"issues": "IssuesEvent",
|
||||
"label": "LabelEvent",
|
||||
"member": "MemberEvent",
|
||||
"membership": "MembershipEvent",
|
||||
"milestone": "MilestoneEvent",
|
||||
"organization": "OrganizationEvent",
|
||||
"page_build": "PageBuildEvent",
|
||||
"ping": "PingEvent",
|
||||
"project": "ProjectEvent",
|
||||
"project_card": "ProjectCardEvent",
|
||||
"project_column": "ProjectColumnEvent",
|
||||
"public": "PublicEvent",
|
||||
"pull_request_review": "PullRequestReviewEvent",
|
||||
"pull_request_review_comment": "PullRequestReviewCommentEvent",
|
||||
"pull_request": "PullRequestEvent",
|
||||
"push": "PushEvent",
|
||||
"repository": "RepositoryEvent",
|
||||
"release": "ReleaseEvent",
|
||||
"status": "StatusEvent",
|
||||
"team_add": "TeamAddEvent",
|
||||
"watch": "WatchEvent",
|
||||
"commit_comment": "CommitCommentEvent",
|
||||
"create": "CreateEvent",
|
||||
"delete": "DeleteEvent",
|
||||
"deployment": "DeploymentEvent",
|
||||
"deployment_status": "DeploymentStatusEvent",
|
||||
"fork": "ForkEvent",
|
||||
"gollum": "GollumEvent",
|
||||
"installation": "InstallationEvent",
|
||||
"installation_repositories": "InstallationRepositoriesEvent",
|
||||
"issue_comment": "IssueCommentEvent",
|
||||
"issues": "IssuesEvent",
|
||||
"label": "LabelEvent",
|
||||
"member": "MemberEvent",
|
||||
"membership": "MembershipEvent",
|
||||
"milestone": "MilestoneEvent",
|
||||
"organization": "OrganizationEvent",
|
||||
"org_block": "OrgBlockEvent",
|
||||
"page_build": "PageBuildEvent",
|
||||
"ping": "PingEvent",
|
||||
"project": "ProjectEvent",
|
||||
"project_card": "ProjectCardEvent",
|
||||
"project_column": "ProjectColumnEvent",
|
||||
"public": "PublicEvent",
|
||||
"pull_request_review": "PullRequestReviewEvent",
|
||||
"pull_request_review_comment": "PullRequestReviewCommentEvent",
|
||||
"pull_request": "PullRequestEvent",
|
||||
"push": "PushEvent",
|
||||
"repository": "RepositoryEvent",
|
||||
"release": "ReleaseEvent",
|
||||
"status": "StatusEvent",
|
||||
"team": "TeamEvent",
|
||||
"team_add": "TeamAddEvent",
|
||||
"watch": "WatchEvent",
|
||||
}
|
||||
)
|
||||
|
||||
@ -159,10 +163,19 @@ func validateSignature(signature string, payload, secretKey []byte) error {
|
||||
}
|
||||
|
||||
// WebHookType returns the event type of webhook request r.
|
||||
//
|
||||
// GitHub API docs: https://developer.github.com/v3/repos/hooks/#webhook-headers
|
||||
func WebHookType(r *http.Request) string {
|
||||
return r.Header.Get(eventTypeHeader)
|
||||
}
|
||||
|
||||
// DeliveryID returns the unique delivery ID of webhook request r.
|
||||
//
|
||||
// GitHub API docs: https://developer.github.com/v3/repos/hooks/#webhook-headers
|
||||
func DeliveryID(r *http.Request) string {
|
||||
return r.Header.Get(deliveryIDHeader)
|
||||
}
|
||||
|
||||
// ParseWebHook parses the event payload. For recognized event types, a
|
||||
// value of the corresponding struct type will be returned (as returned
|
||||
// by Event.ParsePayload()). An error will be returned for unrecognized event
|
||||
|
Reference in New Issue
Block a user