How to list repositories using github app?

Hi,

I’m using the following code in order to generate github api that will list my repos:

When executing the code I’m able to get get a valid installation. However, when trying to list the repos using the url: " installation/repositories" I’m always getting an empty set.

Thought this might be a permission issue so I granted the application all the possible permissions and still no luck.

Any ideas?

Thanks,
Nir.

:wave: hello there and welcome to the GitHub Support Community @nlaufer!

While I can’t speak to how that project should (or shouldn’t) work, there are a few places we suggest you look when you need help with a project hosted on GitHub:

  • its SUPPORT or README file, which may include contact information or an official website
  • its Issues tab, where you can report bugs
  • the owner’s GitHub profile, which may include contact information

Speaking to the GitHub API portion of your report, given the installation/repositories route, it sounds like you’re looking to list repositories accessible to the app installation. If that’s the case, receiving an empty set may be an indication that the GitHub App is not yet installed to any repository.

However, I find it strange that you’re able to get an installation for the authenticated app. If you’re still seeing this issue, a good next step for troubleshooting this furtheris sharing the full request-response pair of a curl -v request that demonstrates what you’re seeing. Please make sure you mask any sensitive information like OAuth tokens and Authorization headers in the output of the curl command!

hi @francisfuzz ,

the issue was in fact that I didn’t install it in the right place.
so I wasn’t able to see the organization.

thank you very much for your help,
Nir.

1 Like