From 99fe2eb2e05d1b2cbeed6fb00b754e8f1c5b2f81 Mon Sep 17 00:00:00 2001 From: Mathieu Poirier Date: Mon, 21 Feb 2022 15:04:25 -0700 Subject: [PATCH] Relax 50/72 rule for more descriptive titles Expand the title and changelog description lines to 60 and 75 respectively. That is in line with what other projects do and allows for better narratives. Signed-off-by: Mathieu Poirier --- integration_tests/test_commit_format.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/integration_tests/test_commit_format.py b/integration_tests/test_commit_format.py index e0ee4d8..d8e0746 100644 --- a/integration_tests/test_commit_format.py +++ b/integration_tests/test_commit_format.py @@ -14,8 +14,8 @@ import subprocess from utils import get_cmd_output -COMMIT_TITLE_MAX_LEN = 50 -COMMIT_BODY_LINE_MAX_LEN = 72 +COMMIT_TITLE_MAX_LEN = 60 +COMMIT_BODY_LINE_MAX_LEN = 75 REMOTE = \ os.environ.get('BUILDKITE_REPO') or \ os.environ.get('REMOTE') or \ @@ -30,9 +30,9 @@ def test_commit_format(): """ Checks commit message format for the current PR's commits. - Checks if commit messages follow the 50/72 git commit rule - [https://www.midori-global.com/blog/2018/04/02/git-50-72-rule] - and if commits are signed. + Checks if commit messages follow the 60/75 commit rule (a maximum + 60 characters for the title and 75 characters for description + lines) and if commits are signed. """ # Fetch the upstream repository. fetch_base_cmd = "git fetch {} {}".format(REMOTE, BASE_BRANCH) @@ -60,8 +60,7 @@ def test_commit_format(): message_lines = message.split("\n") assert len(message_lines) >= 3,\ "The commit '{}' should contain at least 3 lines: title, " \ - "blank line and a sign-off one. Please check: " \ - "https://www.midori-global.com/blog/2018/04/02/git-50-72-rule."\ + "blank line and a sign-off one." \ .format(sha) title = message_lines[0] assert message_lines[1] == "",\