mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 12:55:09 +00:00
CI: Disallow spaces just before the separating colon in commit titles
This commit is contained in:
parent
804d592303
commit
f09e361eef
2 changed files with 2 additions and 2 deletions
2
.github/workflows/lintcommits.yml
vendored
2
.github/workflows/lintcommits.yml
vendored
|
@ -34,7 +34,7 @@ jobs:
|
||||||
uses: tim-actions/commit-message-checker-with-regex@v0.3.1
|
uses: tim-actions/commit-message-checker-with-regex@v0.3.1
|
||||||
with:
|
with:
|
||||||
commits: ${{ steps.get-pr-commits.outputs.commits }}
|
commits: ${{ steps.get-pr-commits.outputs.commits }}
|
||||||
pattern: '^\S.*?: .+'
|
pattern: '^\S.*?\S: .+'
|
||||||
error: 'Missing category in commit title (if this is a fix up of a previous commit, it should be squashed)'
|
error: 'Missing category in commit title (if this is a fix up of a previous commit, it should be squashed)'
|
||||||
|
|
||||||
- name: Check first word of title for capitalization
|
- name: Check first word of title for capitalization
|
||||||
|
|
|
@ -23,7 +23,7 @@ while read -r line; do
|
||||||
((line_number += 1))
|
((line_number += 1))
|
||||||
line_length=${#line}
|
line_length=${#line}
|
||||||
|
|
||||||
category_pattern="^\S.*?: .+"
|
category_pattern="^\S.*?\S: .+"
|
||||||
if [[ $line_number -eq 1 ]] && (echo "$line" | grep -P -v -q "$category_pattern"); then
|
if [[ $line_number -eq 1 ]] && (echo "$line" | grep -P -v -q "$category_pattern"); then
|
||||||
error "Missing category in commit title (if this is a fix up of a previous commit, it should be squashed)"
|
error "Missing category in commit title (if this is a fix up of a previous commit, it should be squashed)"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue