Skip to content

Commit e535dc3

Browse files
committed
Handle cases where branch name includes more than jira ticket
1 parent d28ac71 commit e535dc3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/autocomment_jira_link.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ jobs:
2828
2929
CREATE_COMMENT_URL="https://api.github.com/repos/${REPO}/issues/${PR_NUMBER}/comments"
3030
31-
JIRA_LINK="https://redislabs.atlassian.net/browse/${BRANCH_NAME}"
31+
JIRA_TICKET=$(grep -Eo '^DOC-[0-9]+' <<< "$BRANCH_NAME")
32+
JIRA_LINK="https://redislabs.atlassian.net/browse/${JIRA_TICKET}"
3233
COMMENT="[${BRANCH_NAME}](${JIRA_LINK})"
3334
3435
generate_post_data()

0 commit comments

Comments
 (0)