Please Include Installation ID's on Webhooks


#1

It would be EXTREMELY helpful for webhooks which are generated as part of an integration to include an installation ID in the body. As it stands, the following issues exist:

If the integration provider does not receive the initial “ping” webhook which notifies them of a new Installation, they can not record it in a database. In that case, when subsequent webhooks from that Installation are received, the provider will not have the installation ID at hand, and will not be able to generate an appropriate installation token to perform API operations for that installation. The provider will then need to query the github API, and/or try to maintain a local table.

The body of the webhook is full of URL’s that are supposed to provide all the github-specific identifiers and URL’s about a GITHUB event which might be needed for subsequent API calls regarding that event. Installation ID is fairly obviously a logical addition to the list.


#2

The installationId is part of the webhook payload when it was dispatched for an integration.

In addition to the fields documented for each event, webhook payloads include the user who performed the event (sender) as well as the organization (organization) and/or repository (repository) which the event occurred on, and for an Integration’s webhook may include the installation (installation) which an event relates to.

See https://developer.github.com/webhooks/#payloads


#3

This is fantastic, thank you very much! I did search several pieces of documentation, but did not find mention of it at the time. Bad searching I guess.


#4

Yes it’s kinda hidden. I’ve also been search for it and found it by accident :stuck_out_tongue:


#5