Skip to content

Commit

Permalink
governance: extended commit message length limit to 100
Browse files Browse the repository at this point in the history
  • Loading branch information
vpirogov committed Nov 19, 2024
1 parent 3c1a0d8 commit 807dbd2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/automation/commit-msg-check.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,15 @@ def __scopeCheck(msg: str):

# * Ensuring a character limit for the first line.
def __numCharacterCheck(msg: str):
MAX_LEN = 100
status = "Message length:"
summary = msg.partition("\n")[0]
msgSummaryLen = len(summary)
if msgSummaryLen <= 72:
if msgSummaryLen <= MAX_LEN:
print(f"{status} OK")
return True
else:
print(f"{status} FAILED: Commit message summary must not exceed 72 characters.")
print(f"{status} FAILED: Commit message summary must not exceed {MAX_LEN} characters.")
return False

def main():
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ All code in oneDNN gets promoted to product branches (`master`, `rls-`, and
To simplify the work of reviewers, make sure that the commits in the pull
request adhere to the following requirements:

- Commit message should be fit into 50 (at most 72) characters and have the
- First line of commit message should be fit into 100 characters and have the
imperative mood.
- Commit message should follow the format:
`<scope>:[scope: ..] <short description>`
Expand Down

0 comments on commit 807dbd2

Please sign in to comment.