Skip to content

Commit

Permalink
devtools: relax pr-tool commit checks
Browse files Browse the repository at this point in the history
The headline-check on pr-tool commit now allows up to 60 characters.
  • Loading branch information
arogge authored and pstorz committed Jan 20, 2023
1 parent 0cf6d1a commit d5c9942
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion devtools/pip-tools/pr_tool/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ def check_commit(self, commit):
@classmethod
def _check_headline(cls, text):
issues = []
if len(text) > 50:
# we encourage to use no more than 50 chars, but still accept up to 60
if len(text) > 60:
issues.append("headline too long")
res = cls.headline_pattern.match(text)
if res:
Expand All @@ -178,6 +179,11 @@ def _check_headline(cls, text):
@staticmethod
def _check_body(text):
for line in text.split("\n"):
lowerline = line.lower()
if lowerline.startswith("co-authored-by:") or line.startswith(
"signed-off-by:"
):
continue
if len(line) > 72:
return ["body contains line longer 72 chars"]
return []
Expand Down

0 comments on commit d5c9942

Please sign in to comment.