updated github_pull_request_create.sh

pull/4/head
Hari Sekhon 2 years ago
parent 41f147c6f7
commit 37b4f33477

@ -114,7 +114,7 @@ if [ "$owner_repo" = '{owner}/{repo}' ]; then
if [ -f "$pr_template" ]; then
body_template="$(cat "$pr_template")"
# if branch prefix matches an AA-XXXXX or AA-NNNNN token placeholder in the body, replace it
branch_prefix="$(grep -Eom1 '^[[:alpha:]]{2,}-[[:digit:]]{3,}-' <<< "$head" | sed 's/-$//' || :)"
branch_prefix="$(grep -Eom1 '^[[:alpha:]]{2,}-[[:digit:]]{3,}(-|$)' <<< "$head" | sed 's/-$//' || :)"
if [[ "$branch_prefix" =~ ^[[:alpha:]]{2,}-[[:digit:]]{3,}$ ]]; then
match1="${branch_prefix//[[:digit:]]/X}"
match2="${branch_prefix//[[:digit:]]/N}"

Loading…
Cancel
Save