Skip to content

Fetch private org projects #2691

Answered by gr2m
ghosty2004 asked this question in Q&A
Discussion options

You must be logged in to vote

You have to make sure you have the right permission on your token (read:org scope, or organization_projects:read permission).

Then you use GraphQL, e.g. for org projects

query orgProjects($org:String!) {
  organization(login:$org) {
    projectsV2(first:100) {
      nodes {
        title
        url
        public
      }
    }
  }
}

There is no way to filter out projects directly, so you would need to do that after loading all of them

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ghosty2004
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants