-
-
Save KyMidd/29103679598793c3e68e5951f03f79b2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| 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