GitHub Apps
https://developer.github.com/apps/migrating-oauth-apps-to-github-apps/
https://developer.github.com/apps/quickstart-guides/setting-up-your-development-environment/
認可
Authenticating as a GitHub Appして、
Authenticating as an installationすると、ユーザーやリポジトリに対して権限を持ったトークンが得られる
誰として認可されたかを取りたい時はuser-to-server OAuth access tokenを作る
app idは露出して良い
URLに出ている (renovateの例: https://github.com/settings/installations/759541)
あれでもこれinstallationかな?
どっちにせよAPIでとれるし、秘密の情報ではないはず
Any time a GitHub App receives a webhook, it includes an installation object with an id
なので、トークンは永続化とかせずにWebhookを受けるたびにAuthenticating as an installationする
トークンは1時間でexpireするので永続化しても意味がない