Skip to content

Commit

Permalink
CI: Disallow spaces just before the separating colon in commit titles
Browse files Browse the repository at this point in the history
  • Loading branch information
IdanHo authored and linusg committed Jul 13, 2021
1 parent 804d592 commit f09e361
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lintcommits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
uses: tim-actions/[email protected]
with:
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)'

- name: Check first word of title for capitalization
Expand Down
2 changes: 1 addition & 1 deletion Meta/lint-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ while read -r line; do
((line_number += 1))
line_length=${#line}

category_pattern="^\S.*?: .+"
category_pattern="^\S.*?\S: .+"
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)"
fi
Expand Down

0 comments on commit f09e361

Please sign in to comment.