You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Function to get the Delivery ID for a webhook request #618
I would like to add a function to get the Delivery ID header (X-GitHub-Delivery) for a webhook request. This would essentially be the same as WebHookType but a different header.
If there are no problems with this, I would be glad to open a PR.
I'm not sure I understand the need for a new function. All that is needed is a single line:
deliveryID:=r.Header.Get("X-Github-Delivery")
Oh, I see... #427 added WebHookType. Hmmm... I guess I missed that before. I'm not sure that was necessary, but I guess it shields clients from the details at the expense of a larger API surface.
I've got mixed feelings but could go either way.
@shurcooL - what do you think about adding a new function (maybe DeliveryID) to messages.go that is essentially a one-liner?
Activity
gmlewis commentedon Apr 18, 2017
I'm not sure I understand the need for a new function. All that is needed is a single line:
Oh, I see... #427 added
WebHookType. Hmmm... I guess I missed that before. I'm not sure that was necessary, but I guess it shields clients from the details at the expense of a larger API surface.I've got mixed feelings but could go either way.
@shurcooL - what do you think about adding a new function (maybe
DeliveryID) tomessages.gothat is essentially a one-liner?dmitshur commentedon Apr 18, 2017
SGTM.
Add DeliveryID function for webhook events. (google#619)
Add DeliveryID function for webhook events. (google#619)