Storing GitHub application installation ID?


I’m writing a tool in the form of a GitHub application, but the tool is triggered from a CI environment. Since it’s not triggered by a GitHub event/request I don’t have access to the installation ID. Figured I should listen to GitHub events and store the installation ID that is sent in a database so I can retrieve at a later moment. What is not clear to me is how the installation ID relates to users, organisations or repositories… In other words, I am not sure what the ‘key’ to store the ID under should be. My first guess would be the repository.owner.login field that is also sent in the request.

Hope somebody can shed some light on this.


The installation ID is per installation, i.e. per user or organization that installed your app (with the small caveat that if a user uninstalls and then reinstalls your app, the installation ID will be different, even though the owner will be the same).


Thank you for your reply. So would using repository.owner.login that is given by a GitHub event request be a good idea? I wonder what it’s set to when an organization installs it…