Skip to content

Commit 8a6a5a2

Browse files
committed
CCM-8585: use sed
1 parent 0aeb3e7 commit 8a6a5a2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

.github/actions/normalize-branch-name/action.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ runs:
1111
run: |
1212
branch=$(git rev-parse --abbrev-ref HEAD)
1313
stripped=$(echo $branch | sed -e 's/[^a-zA-Z0-9-]//g' | tr '[:upper:]' '[:lower:]')
14-
echo $stripped
15-
starting_from_jira_ref=$(echo $stripped | grep -Eo '\d{4,}.*' || true)
16-
echo $starting_from_jira_ref
14+
starting_from_jira_ref=$(echo $stripped | sed -n 's/.*\([0-9]\{4,\}.*\)$/\1/p')
1715
with_fallback=${starting_from_jira_ref:-$stripped}
1816
chopped=$(echo $with_fallback | head -c 15)
1917
echo "normalized_branch_name=$chopped" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)