Skip to content

Commit eb3d853

Browse files
committed
Revert "[SPARK-57795][INFRA][FOLLOWUP] Refine the merge summary comment in merge_spark_pr.py"
#56923 was unintentionally merged into master, let me revert it Closes #56924 from zhengruifeng/revert-merge-summary-format. Authored-by: Ruifeng Zheng <ruifengz@apache.org> Signed-off-by: Ruifeng Zheng <ruifengz@apache.org>
1 parent 1ea6ed1 commit eb3d853

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

dev/merge_spark_pr.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ def post_merge_comment(pr_num, merged_commits):
450450
"- merged into %s %s/%s" % (ref, GITHUB_COMMIT_BASE, commit_hash)
451451
for ref, commit_hash in merged_commits
452452
]
453-
body = "**Merge Summary:**\n" + "\n".join(lines) + "\n\n*Posted by `merge_spark_pr.py`*"
453+
body = "**Merge summary** (posted by `merge_spark_pr.py`):\n" + "\n".join(lines)
454454
print("Posting merge comment on PR #%s:\n%s" % (pr_num, body))
455455
if not GITHUB_OAUTH_KEY:
456456
print_error("GITHUB_OAUTH_KEY is not set; skipping the merge comment.")
@@ -560,7 +560,7 @@ def merge_pr(pr_num, target_ref, title, body, pr_repo_desc, pr_author, co_author
560560
clean_up()
561561
print_error("Exception while pushing: %s" % e)
562562

563-
merge_hash = run_cmd("git rev-parse %s" % target_branch_name).strip()
563+
merge_hash = run_cmd("git rev-parse %s" % target_branch_name)[:8]
564564
clean_up()
565565
print("Pull request #%s merged!" % pr_num)
566566
print("Merge hash: %s" % merge_hash)
@@ -594,7 +594,7 @@ def _do_cherry_pick(pr_num, merge_hash, pick_ref):
594594
except Exception as e:
595595
fail("Exception while pushing: %s" % e)
596596

597-
pick_hash = run_cmd("git rev-parse %s" % pick_branch_name).strip()
597+
pick_hash = run_cmd("git rev-parse %s" % pick_branch_name)[:8]
598598
clean_up()
599599

600600
print("Pull request #%s picked into %s!" % (pr_num, pick_ref))

0 commit comments

Comments
 (0)