Context application is missing installation ID and github client is not authenticated
See original GitHub issueBug Report
Current Behavior A clear and concise description of the behavior.
module.exports = (app) => {
app.on("push", (context) => {
let installation = context.payload.installation
console.log(installation) // undefined
// Way of getting an authenticated client to perform commit status operations
let client = await app.auth(process.env.INSTALLATION_ID);
client.request(...)
}
};
Expected behavior/code
Expected behavior is that the context.github
client is actually authenticated
or that payload contains the installationId. Checking the webhook on github, the
sent payload doesn’t contain an installation
object for push
events
Environment
- Probot version(s): v10.10.0
- Node/npm version: v12.19.0
- OS: ubuntu 20.04
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
How to get the installation token? · Issue #1003 - GitHub
The trick here is to use the app's authentication to get the installation token. context.github is authenticated specifically to make ...
Read more >Git generator - Error fetching repo with GitHub app · Issue #480
I have a GitHub app credentials configured globally in ArgoCD for all repository in my-org. However, when an application use the git ......
Read more >probot: Invalid app_id `ID number` · Issue #1065 - GitHub
My bad, I was passing the installation_id from the context payload as const octokit = await app.auth({ id: context.payload.installation.id }).
Read more >Context Deadline Exceeds when Deploying to Cloud Run #2097
I'm deploying a GitHub application that uses go-github through ... API for installation ID 19058859: context deadline exceeded (Client.
Read more >Improve document about authenticating with GitHub Apps #1069
Background () // Set here you application ID and installation id ... Client that will perform the authentication for you. client := github....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks I’ll try to do it over the weekend, on Monday at the latest
closing due to inactivity