Get all repositories linked to a project

Hi GitHub Community 

I would like to make an API request that returns all repositories linked to a project.

(NB: a project that is owned by a user or an organization, not a repository).

I don’t see this option in either V3 or V4.

Am I missing something, or is this option simply missing?

Is there any workaround to determine whether a repository is linked to a project?

Example code of what I ideally would like to do: (V4)

{
    viewer {
      projects(first: 100) {
        nodes {
          id
          name

          // This is what I want to do 👇
          linkedRepositories(first: 100) {
            nodes {
              name
              nameWithOwner
            }
          }

      }
    }
  }
3 Likes

I’m also trying to do this. Using the GraphQL API, I can see the issues linked to a project and similarly, the projects linked to an issue.

But there’s no way to see the repos linked to e.g. an (organization-level) project, even though that information is available in the UI via https://github.com/orgs/{org}/projects/{project_id}/settings/linked_repositories