Created
February 23, 2021 14:22
-
-
Save ryanpedersen42/6a1d01d61ded78b3f51faa9fa13c64f6 to your computer and use it in GitHub Desktop.
Update base branch on PR
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
command: | | |
if [ -n ${CIRCLE_PR_NUMBER:-} ]; then | |
local base_branch=$(curl -fsSL https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pulls/$CIRCLE_PR_NUMBER | jq -r '.base.ref') | |
else | |
local base_branch=$CIRCLE_BRANCH | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment