Skip to content

Instantly share code, notes, and snippets.

@malantin
Created February 27, 2023 20:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save malantin/aedd73e3fd3889d227cc834c57782e15 to your computer and use it in GitHub Desktop.
Save malantin/aedd73e3fd3889d227cc834c57782e15 to your computer and use it in GitHub Desktop.
Get all teams and their permissions on repositories via GraphQL
query
{
organization(login: "octodemo") {
teams(first: 100, after: null) {
nodes {
name
repositories {
nodes {
name
viewerPermission
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment