Skip to content

Commit ebb5b1f

Browse files
committed
Allow for one-liners in overall pattern
1 parent 011cdd1 commit ebb5b1f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/commit-checker.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ jobs:
6363
accessToken: ${{ secrets.GITHUB_TOKEN }} # github access token is only required if checkAllCommitMessages is true
6464
pattern: ^(?!Merge branch 'main' into)
6565
error: 'Ticket branch needs to be rebased onto main'
66+
# Check the full pattern, now that we covered more common mistakes.
6667
- name: Check overall commit Message
6768
if: ${{ success() || failure() }}
6869
uses: gsactions/commit-message-checker@v2
@@ -71,5 +72,5 @@ jobs:
7172
excludeTitle: 'true' # optional: this excludes the title of a pull request
7273
checkAllCommitMessages: 'true' # optional: this checks all commits associated with a pull request
7374
accessToken: ${{ secrets.GITHUB_TOKEN }} # github access token is only required if checkAllCommitMessages is true
74-
pattern: '^(?![A-Z].*\.)[A-Z].{0,49}\r?\n\r?\n(?:.{0,71}\r?\n)*(?:.{0,71}\.)?\r?\n?$'
75-
error: "Something is not right"
75+
pattern: '^(?![A-Z].*\.)[A-Z].{0,49}(\r?|\r?\n(?:.{0,71}\r?\n)*(?:.{0,71}\.)?\r?\n?)$'
76+
error: "The commit messages do not follow "

0 commit comments

Comments
 (0)