Skip to content

Instantly share code, notes, and snippets.

@KyMidd

KyMidd/asdf.sh Secret

Created November 20, 2022 18:59
Show Gist options
  • Save KyMidd/6260c36d5715a3de1b78581d785cfc89 to your computer and use it in GitHub Desktop.
Save KyMidd/6260c36d5715a3de1b78581d785cfc89 to your computer and use it in GitHub Desktop.
# Get branches
curl -s \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
https://api.github.com/repos/$GH_ORG/$GH_REPO/branches 2>&1 > repo_branches
if [[ $(cat repo_branches | grep -E "\"name\"\: \"master\"") ]]; then
MASTER_EXISTS=true
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment