Skip to content

Function to get the Delivery ID for a webhook request #618

Closed

Description

@drewfradette

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.

Activity

  1. gmlewis commented on Apr 18, 2017

    @gmlewis
    Collaborator

    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?

  2. dmitshur commented on Apr 18, 2017

    @dmitshur
    Member

    SGTM.

  3. added a commit that references this issue on Jun 16, 2017
    a132b43
  4. added a commit that references this issue on Jun 28, 2026
    1b1d3a7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions