Permanently include Installation "sender" in future API requests


#1

Today, the “sender” of an Installation creation is only included in the webhook for the “integration_installation” event with the “created” action.

A productive pattern for integrating with webhooks is to not read their data directly – instead using the webhook as a trigger to fetch the corresponding data directly from the Github API. This is particularly useful as a pattern for improving webhook processing reliability, as Github does not retry webhook sends, so any exception in your processing means you’ve lost your chance to process that data.

In turn, it would be convenient for the “integration/installations” endpoint to return the “sender” of the installation as well (https://developer.github.com/v3/integrations/#find-installations).

The sender tends to approximately equal the administrator of the integration, so with this functionality, the “integration_installation” can actually serve as a higher-level authorization handshake for Integrations that also have a web application component.

Thanks for your consideration!


#2

Thanks for the request, @ceslami and for explaining the use case. While that’s not something that’s currently planned, I’ve opened an issue for internal discussion.

We’ll report back here is this is something we decide to support in the future, and I’ll leave this thread open to hear from others about this request.


#3

Thanks @jmilas! Please let me know if I can offer any clarification or answer any questions!


#4

For others who are thinking about this problem, I’ve solved it in a different way.

You can use the /organizations/:id/members?role=admin endpoint to retrieve the Github users who have admin rights for a specific repository. This allows you to offer others, besides the user who installed the integration in the first place, the ability to perform organization-admin-only operations within your application, if you’d like.