lafiona commented on code in PR #14533:
URL: https://github.com/apache/arrow/pull/14533#discussion_r1065152006
##########
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:
Thank you for your suggestion @kou. There is a newline character that I've
added an `rstrip()` call to remove.
--
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]