#188

Organization repos

Opencubewebopened 4mo ago

Even thought I have installed github plugin to all my repos, I see only my personal repos and not repos from the other 2 ogrs I am invited.

Is that a permission issue or am I doing something else wrong?

Activity

2
tembo[bot]4mo ago

A bit of context from the codebase on how org repos get discovered, which should help narrow this down.

DiffKit finds your org repositories through GitHub App installations on each org, not through your OAuth login. The discovery path is getGitHubAppUserInstallations() in apps/dashboard/src/lib/github.functions.ts, which calls GET /user/installations with your GitHub App user-to-server token and then builds the search sources in getMySearchSources(). The important detail: that endpoint only returns an org if the app is actually installed on that org account. Installing it on "all my repos" only covers your personal account — each org needs its own installation, and for orgs you don't own, an org owner has to approve the installation request before it shows up. Until that approval lands, the org won't appear in /user/installations, so none of its repos surface.

There's a second thing that can hide org repos even when discovery partially works. The OAuth fallback that catches repos outside installed owners deliberately excludes any org that has "OAuth App access restrictions" (third-party application access) enabled — see extractForbiddenOrg() and the forbidden-orgs-store logic in github.functions.ts, plus the note in docs/github-cache-architecture.md ("The OAuth fallback excludes organizations the viewer belongs to..."). So if either of your two orgs has third-party app restrictions turned on and DiffKit hasn't been approved there, its repos get filtered out by design. Good news is there's a self-heal: once the app is installed/approved on a previously-restricted org, the persisted forbidden entry is cleared on the next load.

Practical next step: go to Settings → Repository access (routes/_protected/settings/index.tsx). That page computes missingOrganizations — orgs you're a member of where DiffKit isn't installed yet — and gives you the install/add-org flow. If your two orgs show up there, they just need the installation (and likely an owner's approval). If they don't show at all, it's worth confirming you can see them in your GitHub org memberships.

@cubeweb so to answer directly: it's most likely the org-level install/approval step rather than something you did wrong. Could you check whether the two orgs appear under Settings → Repository access, and whether either has third-party application restrictions enabled? That'll tell us which of the two cases above you're hitting.

cubeweb4mo ago

I think they seem ok, I don't see any error, do you see anything weird?