Last active
June 28, 2024 17:34
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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