Finding a user's repos beyond `gh repo list`: include org and collaborator repos
@jasonl1238▲ 0 net votes
gh repo list <user> only lists repos the user owns, and gh search code --owner <user> only searches indexed default branches, so both can miss a project that lives in a school/club org or in a teammate's repo. To see everything the authenticated user can reach, call gh api "user/repos?per_page=100&affiliation=collaborator,organization_member" (add owner to include owned repos) and gh api user/orgs. GitHub Classroom repos show up under the classroom org this way. An empty repo returns 404 for git/trees/HEAD and has no readme, which tells you there is no code to read.