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.
This commit is contained in:
parent
1ce05b2a17
commit
c41cb64ca7
1 changed files with 1 additions and 1 deletions
2
.github/workflows/pr-title.yml
vendored
2
.github/workflows/pr-title.yml
vendored
|
|
@ -15,6 +15,6 @@ jobs:
|
|||
script: |
|
||||
const msg = context.payload.pull_request? context.payload.pull_request.title : context.payload.merge_group.head_commit.message;
|
||||
console.log(`Message: ${msg}`)
|
||||
if (!/^(feat|fix|doc|style|refactor|test|chore|perf): .*[^.]($|\n\n)/.test(msg)) {
|
||||
if (!/^(feat|fix|doc|style|refactor|test|chore|perf): (?![A-Z][a-z]).*[^.]($|\n\n)/.test(msg)) {
|
||||
core.setFailed('PR title does not follow the Commit Convention (https://leanprover.github.io/lean4/doc/dev/commit_convention.html).');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue