fix trailing slash

Signed-off-by: vsoch <vsochat@stanford.edu>
This commit is contained in:
vsoch
2020-03-18 15:20:50 -06:00
parent 617744b952
commit 6795aa743d

View File

@@ -80,6 +80,10 @@ create_pull_request() {
NUMBER=$(echo "${RESPONSE}" | jq --raw-output '.number') NUMBER=$(echo "${RESPONSE}" | jq --raw-output '.number')
printf "Number opened for PR is ${NUMBER}\n" printf "Number opened for PR is ${NUMBER}\n"
# Remove trailing slashes
ASSIGNEES="${ASSIGNEES%\"}"
ASSIGNEES="${ASSIGNEES#\"}"
# Parse assignees into a list # Parse assignees into a list
ASSIGNEES=$(echo $ASSIGNEES | sed -e 's/\(\w*\)/,"\1"/g' | cut -d , -f 2-) ASSIGNEES=$(echo $ASSIGNEES | sed -e 's/\(\w*\)/,"\1"/g' | cut -d , -f 2-)
printf "Attempting to assign ${ASSIGNEES} to ${PR} with number ${NUMBER}" printf "Attempting to assign ${ASSIGNEES} to ${PR} with number ${NUMBER}"