Skip to content

Commit 449a73d

Browse files
Merge pull request #10 from fullstackzach/test-branch
bad commit
2 parents 962cf5e + 4da7989 commit 449a73d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/scripts/commit-linting-loose.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ git checkout -q $1
77

88
# Set variables
99
BASE_BRANCH=$2
10-
msg_regex='(AAA|BBB|CCC)\-[0-9]+'
10+
msg_regex='AUS\-[0-9]+'
1111
skip_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
5759
fi
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"
6264
echo "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"
6365
echo "Please fix the commit message and push again."
6466
echo "https://help.github.com/en/articles/changing-a-commit-message"

0 commit comments

Comments
 (0)