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
Yes and no. CCMenu calls both endpoints. You can see the logic here. But it looks like CCMenu needs to make a third API call to get the private org repos.
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 userBut I think for private repos of an organization you need to call
/orgs/{org}/repos
(note it'sorgs
notusers
in the first level) (see https://docs.github.com/en/enterprise-server@3.9/rest/repos/repos?apiVersion=2022-11-28)