Skip to content

Commit

Permalink
refactor(git): quote True and False where used as strings
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed Oct 17, 2019
1 parent 778c7bb commit ad115ec
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ssf/files/default/git/git_10_prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ BRANCH_UPSTREAM=${2}
BRANCH_PR=${3}
COMMIT_GREP=${4}
# Prepare initial state line variables
CHANGED=True
CHANGED='True'
COMMENT='Command `'${STATE}'` run'

# Check if PR branch already exists
Expand All @@ -22,7 +22,7 @@ fi

# Perform actions depending on if a commit was found or not
if [ ! -z "${COMMIT}" ]; then
CHANGED=False
CHANGED='False'
else
git checkout ${BRANCH_UPSTREAM}
git pull
Expand Down
2 changes: 1 addition & 1 deletion ssf/files/default/git/git_20_commit_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ REMOTE_FORK_BRANCH=${11}
REMOTE_UPSTREAM_NAME=${12}
REMOTE_UPSTREAM_BRANCH=${13}
# Prepare initial state line variables
CHANGED=True
CHANGED='True'
COMMENT='Command `'${STATE}'` run'

# Prepare git options depending on if a commit was found or not
Expand Down
4 changes: 2 additions & 2 deletions ssf/files/default/git/git_30_create_PR.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ COMMIT_TITLE=${7}
COMMIT_BODY=${8}
FILE_API_RESPONSE=${9}
# Prepare initial state line variables
CHANGED=True
CHANGED='True'
COMMENT='Command `'${STATE}'` run'

# Only create the PR if it doesn't already exist
# If it already exists, the `git push` done earlier will have updated the PR already
PR_EXISTS=$(curl -i https://api.github.com/repos/${REPO_OWNER}/${REPO_NAME}/pulls | grep "${GH_USER}:${BRANCH_PR}")
if [ ! -z "${PR_EXISTS}" ]; then
CHANGED=False
CHANGED='False'
else
curl -H "Authorization: bearer ${GH_TOKEN}" -d '
{
Expand Down

0 comments on commit ad115ec

Please sign in to comment.