-
-
Save KyMidd/284a26907efc22c0db4280e5857a93e0 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
| # Less than or equal to 100 branches, get them all in one request | |
| if [[ $REPO_BRANCH_COUNT -le 100 ]]; then | |
| ALL_BRANCHES=$(curl -sL \ | |
| -H "Accept: application/vnd.github+json" \ | |
| -H "Authorization: Bearer $GITHUB_TOKEN" \ | |
| https://api.github.com/repos/$GH_ORG/$GH_REPO/branches?per_page=100 | jq -r '.[].name') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment