Store GitHub App installation_id on comment


Hello! Currently, when an App comments on an issue or PR, there is very little difference from a user’s comment as far as the API is concerned. Fetching the comments in an issue will return something similar to this (obviously with more fields):

  login: 'JasonEtco',
  type: 'User'
  login: 'my-app[bot]',
  type: 'Bot'

However, if I want to filter these by comments made by my installation, I have to be aware of it’s name rather than its installation id. Since I’m already storing the APP_ID as an environment variable, I think it would be better to use that as the source of truth and not have to rely on this string as well.

I think the easiest fix would be to add a new field to what the API returns:

  login: 'my-app[bot]',
  type: 'Bot',
  installation_id: 123

Thanks for reading :call_me_hand:


Thanks for your feedback, @JasonEtco. I have passed your feedback to the team.

To be frank, it’s unlikely that we would make this change, since it would mean having special-case fields in a generic response.


Thanks @kytrinyx, and no worries, I understand the disadvantages of my proposed solution. I do think that apps filtering for their own comments will be a common ask, so I’m here’s hoping y’all will find a good solution!