From 30802e07b2d84fbc213b490d3402707dffe60096 Mon Sep 17 00:00:00 2001 From: Niall Sheridan Date: Mon, 10 Apr 2017 21:18:42 +0100 Subject: update dependencies --- vendor/github.com/google/go-github/github/messages.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'vendor/github.com/google/go-github/github/messages.go') diff --git a/vendor/github.com/google/go-github/github/messages.go b/vendor/github.com/google/go-github/github/messages.go index 5f67ba5..a7ec65f 100644 --- a/vendor/github.com/google/go-github/github/messages.go +++ b/vendor/github.com/google/go-github/github/messages.go @@ -4,7 +4,7 @@ // license that can be found in the LICENSE file. // This file provides functions for validating payloads from GitHub Webhooks. -// GitHub docs: https://developer.github.com/webhooks/securing/#validating-payloads-from-github +// GitHub API docs: https://developer.github.com/webhooks/securing/#validating-payloads-from-github package github @@ -31,7 +31,7 @@ const ( sha512Prefix = "sha512" // signatureHeader is the GitHub header key used to pass the HMAC hexdigest. signatureHeader = "X-Hub-Signature" - // eventTypeHeader is the Github header key used to pass the event type. + // eventTypeHeader is the GitHub header key used to pass the event type. eventTypeHeader = "X-Github-Event" ) @@ -56,6 +56,9 @@ var ( "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", @@ -143,7 +146,7 @@ func ValidatePayload(r *http.Request, secretKey []byte) (payload []byte, err err // payload is the JSON payload sent by GitHub Webhooks. // secretKey is the GitHub Webhook secret message. // -// GitHub docs: https://developer.github.com/webhooks/securing/#validating-payloads-from-github +// GitHub API docs: https://developer.github.com/webhooks/securing/#validating-payloads-from-github func validateSignature(signature string, payload, secretKey []byte) error { messageMAC, hashFunc, err := messageMAC(signature) if err != nil { @@ -162,7 +165,7 @@ func WebHookType(r *http.Request) string { // ParseWebHook parses the event payload. For recognized event types, a // value of the corresponding struct type will be returned (as returned -// by Event.Payload()). An error will be returned for unrecognized event +// by Event.ParsePayload()). An error will be returned for unrecognized event // types. // // Example usage: @@ -191,5 +194,5 @@ func ParseWebHook(messageType string, payload []byte) (interface{}, error) { Type: &eventType, RawPayload: (*json.RawMessage)(&payload), } - return event.Payload(), nil + return event.ParsePayload() } -- cgit v1.2.3