-
-
Save KyMidd/f08bca5669af2c68e86e0bdbad223285 to your computer and use it in GitHub Desktop.
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
# Grab Org info to get repo counts | |
curl -sL \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Authorization: Bearer $GITHUB_TOKEN"\ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
https://api.github.com/orgs/$GH_ORG > org_info.json | |
# Filter org info to get repo counts | |
PRIVATE_REPO_COUNT=$(cat org_info.json | jq -r '.owned_private_repos') | |
PUBLIC_REPO_COUNT=$(cat org_info.json | jq -r '.public_repos') | |
TOTAL_REPO_COUNT=$(($PRIVATE_REPO_COUNT + $PUBLIC_REPO_COUNT)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment