ccmenu2
ccmenu2 copied to clipboard
Not listing private repositories for an organization I'm a member of
I've successfully authenticated a GitHub user, and am able to add both the public-repo workflow of an organization, and the private-repo workflow of the user itself. However when I enter the name of an organization that the user is a member of in the "Owner" box it doesn't list the private repositories in that organization. If I visit the organization in the GitHub Web App with the same user I can see both the private repositories, and the workflows.
I suspect the problem here is that in GitHubAPI.swift to list the repositories you're either doing:
-
/users/{org}/repos
for the public repos of an owner, or -
/user/repos
for the private personal repos of the user
But I think for private repos of an organization you need to call /orgs/{org}/repos
(note it's orgs
not users
in the first level) (see https://docs.github.com/en/[email protected]/rest/repos/repos?apiVersion=2022-11-28)