Github App - search/code REST API not working for organization private repositories #113651
Unanswered
alvmarcos
asked this question in
Apps, API and Webhooks
Replies: 3 comments
|
This could be a related issue: https://github.com/orgs/community/discussions/48102 |
0 replies
|
I facing the exact issue! |
0 replies
|
Is there any workaround/solution for this, other than using personal pat |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Select Topic Area
Bug
Body
Hello, I have been searching for an answer for quite a while but was not able to get any relevant information or instructions. So far, the issue is the following:
My use case is to identify specific files with certain content/characteristics in such private repos (using an app installation token). Unfortunately, this api always return an empty response (with 200 status code) when I use the qualifier repo:ORG/PRIVATE_REPO_NAME + optional search terms (e.g. name or contents of the file or even nothing else). According to the documentation of the endpoint (linked above) it should work with App installation tokens, without any additional permissions. I have confirmed this endpoint works with public repositories (returns a non-empty response).
I have also confirmed the search/repositories endpoint works (is able to list in the response) private repositories of the organization.
I have also used the token with Graphql API and it works for repository searches, although this API is not able to provide code search.
Thus, I believe this is either a bug or an expected behaviour that is not correctly documented. I am looking forward for any feedback on permissions the app may need or the way to make this work. Thank you in advance. Kind regards.
All reactions