github: Fix commit message parsing (#8817)

This commit is contained in:
Powei Feng
2025-06-03 14:24:29 -07:00
committed by GitHub
parent 8b87a54c1a
commit 0ecf6c46e2
2 changed files with 15 additions and 8 deletions

View File

@@ -21,15 +21,12 @@ RDIFF_UPDATE_GOLDEN_STR = 'RDIFF_BRANCH'
def _parse_commit(commit_str):
lines = commit_str.split('\n')
if len(lines) >= 4:
if len(lines) >= 5:
commit, author, date, _, title, *desc = lines
else:
print(commit_str, file=sys.stderr)
return (
lines[0],
lines[1],
'',
)
return (commit_str, '', '')
commit = commit.split(' ')[1]
title = title.strip()