From 6795aa743d0e4ace6097e0a911998faad19542f6 Mon Sep 17 00:00:00 2001 From: vsoch Date: Wed, 18 Mar 2020 15:20:50 -0600 Subject: [PATCH] fix trailing slash Signed-off-by: vsoch --- pull-request.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pull-request.sh b/pull-request.sh index 68be2f4..3518fc9 100755 --- a/pull-request.sh +++ b/pull-request.sh @@ -80,7 +80,11 @@ create_pull_request() { NUMBER=$(echo "${RESPONSE}" | jq --raw-output '.number') printf "Number opened for PR is ${NUMBER}\n" - # Parse assignees into a list + # Remove trailing slashes + ASSIGNEES="${ASSIGNEES%\"}" + ASSIGNEES="${ASSIGNEES#\"}" + + # Parse assignees into a list ASSIGNEES=$(echo $ASSIGNEES | sed -e 's/\(\w*\)/,"\1"/g' | cut -d , -f 2-) printf "Attempting to assign ${ASSIGNEES} to ${PR} with number ${NUMBER}"