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.

GitHub App Installation APIs missing

See original GitHub issue

I’m using a GitHub App with two goals: get the (private) repositories in an organization, and get the (private) members in the organization.

The way I’m using this API is by creating an installation of the app on my organization. My App is set to have read access to checks, members and metadata. Then I use the private key to generate a JWT token and authenticate with the API, which gives me a GHApp object. From there I’m using listInstallations to create a new GitHub object with the installation token.

So now I’m authenticated as my installation on the organization, which is where I expect to be. However from here I don’t see any installation-specific methods I can use with this Java API. The getRepositories seems to use the /user/{org}/repositories endpoint, which means I only get the public repositories on my organization, whereas I’m looking for the GET /installation/repositories endpoint. In addition to this, the listMembers method is also only showing me the public members, but not the ones marked as private in the organization. Am I missing something? I’m new to the GitHub API so I could just be not using this API correctly.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
PauloMigAlmeidacommented, Dec 14, 2019

Hi @carterbuce,

I tried obtaining the same behaviour with:

  • GitHub App (Target Type Org) -> Curl and API
  • GitHub App (Target Type User) -> Curl and API

And in all cases, I obtained the same result I mentioned in my previous comment. Here is what I propose: Let’s do a 1:1 video conf (Skype or any other tool) so that we can debug it a bit further and potentially find out what’s different between your env/app and the ones I’m using.

PS.: You can find my email on my profile and please bear in mind I’m in NZTD (GMT +13:00).

1reaction
PauloMigAlmeidacommented, Dec 9, 2019

Nevermind, I understood what you meant now.

Yep, that endpoint is missing… as soon as I finish the thing I’m doing now I will take a look at it (unless someone else creates a PR before that)

Good catch @carterbuce

Read more comments on GitHub >

github_iconTop Results From Across the Web

Apps - GitHub Docs
The GitHub Apps API enables you to retrieve the information about the installation as well as specific information about GitHub Apps.
Read more >
GitHub App Installation APIs missing · Issue #628
I'm using a GitHub App with two goals: get the (private) repositories in an organization, and get the (private) members in the organization....
Read more >
GitHub App installations
The GitHub App installations API enables you to get information about installations of your GitHub App and perform actions within those installations.
Read more >
Authenticating with GitHub Apps
Accessing API endpoints as an installation. HTTP-based Git access by an installation. You can authenticate as a GitHub App or as an installation....
Read more >
Using the GitHub API in your app
rb code, you're going to create code that automatically adds the needs-response label to all issues opened in the repository where the app...
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