Skip to content

Commit

Permalink
ci: ensure PR titles are no longer than 72 characters (#3267)
Browse files Browse the repository at this point in the history
GitHub wraps the titles of commits if they are longer than 72 characters. See fbd4192 for example.

There is a convention that titles should be no more than 50 characters: https://cbea.ms/git-commit/#limit-50
This however makes crafting the message quite difficult, esp. with our use of conventional commit messages, thus limiting it to 72 seems more reasonable as that is where tooling (.e.g GitHub) seems to "break".
  • Loading branch information
thomaseizinger authored Dec 30, 2022
1 parent 56b3b8f commit 72e52f4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -300,4 +300,14 @@ jobs:
test
ci
refactor
requireScope: false
require_scope: false

- name: Check PR title length
run: |
title="${{ github.event.pull_request.title }}"
title_length=${#title}
if [ $title_length -gt 72 ]
then
echo "PR title is too long (greater than 72 characters)"
exit 1
fi

0 comments on commit 72e52f4

Please sign in to comment.