Skip to content

Instantly share code, notes, and snippets.

@froi
Last active June 28, 2024 17:34
Show Gist options
  • Save froi/b0ef20a2daf10052147dbddce34ea833 to your computer and use it in GitHub Desktop.
Save froi/b0ef20a2daf10052147dbddce34ea833 to your computer and use it in GitHub Desktop.
gh command to get all repos from a team that have not been archived
gh_org="Code4PuertoRico"
gh_team="code4pr-design"
gh api graphql -f query="query {
organization(login: $gh_org) {
team(slug: $gh_team) {
repositories(first:100) {
nodes {
nameWithOwner
isArchived
}
}
}
}
}"| jq '.data.organization.team.repositories.nodes.[] | select(.isArchived == false) | .nameWithOwner' | pbcopy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment