mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:58:11 +00:00
Meta: Add a check for periods on the end of titles to commit linter
This commit is contained in:
parent
04f26183cb
commit
3f08e957d4
2 changed files with 12 additions and 0 deletions
8
.github/workflows/cmake.yml
vendored
8
.github/workflows/cmake.yml
vendored
|
@ -265,6 +265,14 @@ jobs:
|
||||||
pattern: '^\S.*?: .+'
|
pattern: '^\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 title
|
||||||
|
if: ${{ success() || failure() }}
|
||||||
|
uses: tim-actions/commit-message-checker-with-regex@v0.3.1
|
||||||
|
with:
|
||||||
|
commits: ${{ steps.get-pr-commits.outputs.commits }}
|
||||||
|
pattern: '^.+[^.\n](\n.*)*$'
|
||||||
|
error: 'Commit title ends in a period'
|
||||||
|
|
||||||
notify_irc:
|
notify_irc:
|
||||||
needs: [build_and_test_serenity, build_and_test_lagom, lint_commits]
|
needs: [build_and_test_serenity, build_and_test_lagom, lint_commits]
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
|
|
@ -28,6 +28,10 @@ while read -r line; do
|
||||||
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
|
||||||
|
|
||||||
|
if [[ $line_number -eq 1 ]] && [[ "$line" =~ \.$ ]]; then
|
||||||
|
error "Commit title ends in a period"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $line_length -gt 72 ]]; then
|
if [[ $line_length -gt 72 ]]; then
|
||||||
error "Commit message lines are too long (maximum allowed is 72 characters)"
|
error "Commit message lines are too long (maximum allowed is 72 characters)"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue