Skip to content

Instantly share code, notes, and snippets.

@KyMidd

KyMidd/asdf.sh Secret

Created March 25, 2023 01:59
Show Gist options
  • Select an option

  • Save KyMidd/41dafe4b5525319f8516c583be3f0e3f to your computer and use it in GitHub Desktop.

Select an option

Save KyMidd/41dafe4b5525319f8516c583be3f0e3f to your computer and use it in GitHub Desktop.
# More than 100 branches, get them in multiple requests
else
# Calculate number of pages needed to get all repos
BRANCHES_PER_PAGE=100
PAGES_NEEDED=$(($REPO_BRANCH_COUNT / $BRANCHES_PER_PAGE))
if [ $(($REPO_BRANCH_COUNT % $BRANCHES_PER_PAGE)) -gt 0 ]; then
PAGES_NEEDED=$(($PAGES_NEEDED + 1))
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment