GitHub internal repositories are not synced when specifying "orgs"
Created by: unknwon
Private repositories are synced correctly (according to the customer), but internal repositories are not showing up in the search result.
Customer confirmed that the "token" in the code host connection is able to see the internal repository when curling the GitHub API directly by sending us the output of the following command:
curl -v -H "Authorization: token {GitHub token}" https://api.github.com/repos/{name of the organization}/{name of an internal repository}
Example config:
{
"url": "https://github.com",
"token": "<REDACTED>",
"authorization": {
"ttl": "3h"
},
"orgs": [
"<REDACTED>"
]
}
Notes
- Internal repositories may not be synced/worked in any case, it's just that the customer is using "orgs" in the code host connection.
According to GitHub docs, GHE 2.20+ should have the "internal" visibility option, but our GHE test instance (2.20.8) doesn't have it.- Looking at the GitHub API docs for listing organization repositories, I do not see a reason why we would not sync for internal repositories (we don't specify any so default):
Specifies the types of repositories you want returned. Can be one of all, public, private, forks, sources, member, internal. Default: all.
TODO
-
Confirm if internal repositories show up in the site admin panel: they can't -
Make our GHE test instance have the "internal" visibility option (or have a GitHub Enterprise Cloud test org that has this option)