Skip to content

Commit c41cb64

Browse files
authored
chore: adjust pr-title check to enforce capitalization (#11033)
This PR updates the `pr-title` CI check to enforce that the commit message does not start with a capital letter followed by a non-capital letter. This should ensure that messages do not start with a capitalized word, but allow messages that start with an acronym.
1 parent 1ce05b2 commit c41cb64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/pr-title.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ jobs:
1515
script: |
1616
const msg = context.payload.pull_request? context.payload.pull_request.title : context.payload.merge_group.head_commit.message;
1717
console.log(`Message: ${msg}`)
18-
if (!/^(feat|fix|doc|style|refactor|test|chore|perf): .*[^.]($|\n\n)/.test(msg)) {
18+
if (!/^(feat|fix|doc|style|refactor|test|chore|perf): (?![A-Z][a-z]).*[^.]($|\n\n)/.test(msg)) {
1919
core.setFailed('PR title does not follow the Commit Convention (https://leanprover.github.io/lean4/doc/dev/commit_convention.html).');
2020
}

0 commit comments

Comments
 (0)