From a68aaa114eb3aeca119b0da0b313b3c607a4e66e Mon Sep 17 00:00:00 2001 From: Powei Feng Date: Mon, 2 Jun 2025 15:55:35 -0700 Subject: [PATCH] renderdiff: fix breakage in parsing commit message (#8808) --- .github/workflows/postsubmit.yml | 3 --- test/renderdiff/src/commit_msg.py | 11 ++++++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/postsubmit.yml b/.github/workflows/postsubmit.yml index 944e13a105..b61efdb1da 100644 --- a/.github/workflows/postsubmit.yml +++ b/.github/workflows/postsubmit.yml @@ -1,9 +1,6 @@ name: 'Post-submit tasks' on: - pull_request: - branches: - - main push: branches: - main diff --git a/test/renderdiff/src/commit_msg.py b/test/renderdiff/src/commit_msg.py index f658a0ea65..35d0fa70e8 100644 --- a/test/renderdiff/src/commit_msg.py +++ b/test/renderdiff/src/commit_msg.py @@ -20,7 +20,16 @@ from utils import execute, ArgParseImpl RDIFF_UPDATE_GOLDEN_STR = 'RDIFF_BRANCH' def _parse_commit(commit_str): - commit, author, date, _, title, *desc = commit_str.split('\n') + lines = commit_str.split('\n') + if len(lines) >= 4: + commit, author, date, _, title, *desc = lines + else: + print(commit_str, file=sys.stderr) + return ( + lines[0], + lines[1], + '', + ) commit = commit.split(' ')[1] title = title.strip()