File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ git checkout -q $1
77
88# Set variables
99BASE_BRANCH=$2
10- msg_regex=' (AAA|BBB|CCC) \-[0-9]+'
10+ msg_regex=' AUS \-[0-9]+'
1111skip_regex=' \[SKIP JIRA\]'
1212
1313# Initialize invalidCommit as false, will be set to true by any invalid commits
@@ -32,6 +32,8 @@ for commit in $BRANCH_COMMITS; do
3232 exit 0
3333 fi
3434
35+ echo $COMMIT_MSG_UPPER
36+
3537 if echo $COMMIT_MSG_UPPER | grep -iqE " $msg_regex " ; then
3638 echo " ************"
3739 echo " Jira ticket # found in a commit mesage 👍🏻"
@@ -56,9 +58,9 @@ if echo $CURRENT_BRANCH_UPPER | grep -iqE "$msg_regex"; then
5658 exit 0
5759fi
5860
59- # If we made it thsis far, no JIRA ticket # was detected in a commit or branch, print the reject message and fail the job
61+ # If we made it this far, no JIRA ticket # was detected in a commit or branch, print the reject message and fail the job
6062
61- echo " ⛔️ Atleast one commit messages OR your branch name must include a JIRA ticket number e.g. \" AAA -1234\" . This can be anywhere in your commit"
63+ echo " ⛔️ At least one commit message OR your branch name must include a JIRA ticket number e.g. \" AUS -1234\" . This can be anywhere in your commit"
6264echo " You can skip this whole step if necessary by running \" git commit --amend\" and add \" [skip jira]\" in your last commit message, and force-push"
6365echo " Please fix the commit message and push again."
6466echo " https://help.github.com/en/articles/changing-a-commit-message"
You can’t perform that action at this time.
0 commit comments