You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Private repositories of a personal-account owner never appear, even with that owner's token set #465
SyncGitHubRepoInfoForOwner (ProjectDirector/ProjectDirector.cs:1006-1011) lists an owner's repositories with GitHubClient.Repository.GetAllForUser(owner), i.e. GET /users/{owner}/repos. GitHub documents that endpoint as returning public repositories only, even when the request is authenticated as that same user. Only Organization owners get the additional GetAllForOrg call, which does return private repos the token can see.
So the per-owner token (Set GitHub Owner Token, credential selection at ProjectDirector.cs:1226-1236 / 314-328) only helps organizations; for a User owner it changes nothing about what gets listed.
Failure scenario
Add owner alice (a User account) and set alice's PAT via "Set GitHub Owner Token".
Scan > GitHub Owners.
Only alice's public repositories are listed; her private ones never show up, so they cannot be cloned, compared, or used as propagation targets from the app.
Suggested fix
Resolve the authenticated login (GitHubClient.User.Current()). When the owner is a User and equals that login (case-insensitive), list with GitHubClient.Repository.GetAllForCurrent(new RepositoryRequest { Affiliation = RepositoryAffiliation.Owner }).
Keep GetAllForUser for other users (where public-only is correct).
Priority: Medium. For User owners, the per-owner token has no effect on listing, so private repos can't be cloned, compared, or used as propagation targets. Nothing crashes, and organization owners are unaffected.
Suggested area / assignment:ProjectDirector/ProjectDirector.cs GitHub sync (SyncGitHubRepoInfoForOwner)
Recommended next step: When the owner equals the authenticated login, branch to GetAllForCurrent(Affiliation = Owner). Test it with a mocked client, since the live API can't run in CI.
What's wrong
SyncGitHubRepoInfoForOwner(ProjectDirector/ProjectDirector.cs:1006-1011) lists an owner's repositories withGitHubClient.Repository.GetAllForUser(owner), i.e.GET /users/{owner}/repos. GitHub documents that endpoint as returning public repositories only, even when the request is authenticated as that same user. Only Organization owners get the additionalGetAllForOrgcall, which does return private repos the token can see.So the per-owner token (
Set GitHub Owner Token, credential selection atProjectDirector.cs:1226-1236/314-328) only helps organizations; for a User owner it changes nothing about what gets listed.Failure scenario
alice(a User account) and set alice's PAT via "Set GitHub Owner Token".Suggested fix
GitHubClient.User.Current()). When the owner is a User and equals that login (case-insensitive), list withGitHubClient.Repository.GetAllForCurrent(new RepositoryRequest { Affiliation = RepositoryAffiliation.Owner }).GetAllForUserfor other users (where public-only is correct).