ccmenu / ccmenu2

CCMenu is a Mac app that shows the status of builds on CI/CD servers in the menu bar.
https://ccmenu.org/
Apache License 2.0
29 stars 6 forks source link

Not listing private repositories for an organization I'm a member of #9

Open mikebroberts opened 3 months ago

mikebroberts commented 3 months ago

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:

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/enterprise-server@3.9/rest/repos/repos?apiVersion=2022-11-28)

erikdoe commented 3 months ago

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.