kou commented on code in PR #14533:
URL: https://github.com/apache/arrow/pull/14533#discussion_r1064051564


##########
dev/merge_arrow_pr.py:
##########
@@ -110,10 +111,32 @@ def strip_ci_directives(commit_message):
     return _REGEX_CI_DIRECTIVE.sub('', commit_message)
 
 
+def git_default_branch_name():
+    default_branch_name = os.getenv("MERGE_SCRIPT_DEFAULT_BRANCH_NAME")
+
+    if default_branch_name is None:
+        try:
+            default_reference = run_cmd(
+                "git rev-parse --abbrev-ref origin/HEAD")
+            default_branch_name = default_reference.lstrip("origin/")

Review Comment:
   Do we need `rstrip()` here to remove new line?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to