Skip to content

Commit

Permalink
devtools: support single-line commit with no EOL
Browse files Browse the repository at this point in the history
  • Loading branch information
arogge committed Feb 23, 2023
1 parent b1019b1 commit f7ea6d1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion devtools/pip-tools/pr_tool/main.py
Expand Up @@ -215,7 +215,9 @@ def __init__(self, commits):
def check_commit(self, commit):
headline, *messageBody = commit.message.split("\n")
issues = []
if messageBody[0] == "":
if len(messageBody) == 0:
issues.append("missing newline at end of headline")
elif messageBody[0] == "":
messageBody.pop(0)
else:
issues.append("missing empty line after headline")
Expand Down

0 comments on commit f7ea6d1

Please sign in to comment.