question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Context application is missing installation ID and github client is not authenticated

See original GitHub issue

Bug 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:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Kerrubacommented, Oct 30, 2020

Thanks I’ll try to do it over the weekend, on Monday at the latest

0reactions
gr2mcommented, Jul 9, 2021

closing due to inactivity

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found