Skip to content

Commit

Permalink
refactor(git): use boolean versions of PUSH_ACTIVE and PUSH_VIA_PR
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed Oct 17, 2019
1 parent ad115ec commit 817f0d3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ssf/files/default/git/git_20_commit_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ COMMIT_GREP=${4}
COMMIT_TITLE=${5}
COMMIT_BODY=${6}
COMMIT_OPTIONS=${7}
PUSH_ACTIVE=${8}
PUSH_VIA_PR=${9}
PUSH_ACTIVE=$(echo ${8} | tr "[:upper:]" "[:lower:]")
PUSH_VIA_PR=$(echo ${9} | tr "[:upper:]" "[:lower:]")
REMOTE_FORK_NAME=${10}
REMOTE_FORK_BRANCH=${11}
REMOTE_UPSTREAM_NAME=${12}
Expand All @@ -32,8 +32,8 @@ fi

# Perform actions
git commit ${AMEND} "${COMMIT_OPTIONS}" -m "${COMMIT_TITLE}" -m "${COMMIT_BODY}"
if [ "${PUSH_ACTIVE}" = "True" ]; then
if [ "${PUSH_VIA_PR}" = "True" ]; then
if ${PUSH_ACTIVE}; then
if ${PUSH_VIA_PR}; then
git push ${FORCE} -u ${REMOTE_FORK_NAME} ${BRANCH_PR}
else
git checkout ${BRANCH_UPSTREAM}
Expand Down

0 comments on commit 817f0d3

Please sign in to comment.