Skip to content

Commit 9b6b0a7

Browse files
committed
resolved variable scope issue
1 parent 7d5fa20 commit 9b6b0a7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dev/merge_spark_pr.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def clean_up():
9595

9696

9797
# merge the requested PR and return the merge hash
98-
def merge_pr(pr_num, target_ref):
98+
def merge_pr(pr_num, target_ref, title, body, pr_repo_desc):
9999
pr_branch_name = "%s_MERGE_PR_%s" % (BRANCH_PREFIX, pr_num)
100100
target_branch_name = "%s_MERGE_PR_%s_%s" % (BRANCH_PREFIX, pr_num, target_ref.upper())
101101
run_cmd("git fetch %s pull/%s/head:%s" % (PR_REMOTE_NAME, pr_num, pr_branch_name))
@@ -339,6 +339,8 @@ def standardize_jira_ref(text):
339339
return clean_text
340340

341341
def main():
342+
global original_head
343+
342344
os.chdir(SPARK_HOME)
343345
original_head = run_cmd("git rev-parse HEAD")[:8]
344346

@@ -407,7 +409,7 @@ def main():
407409

408410
merged_refs = [target_ref]
409411

410-
merge_hash = merge_pr(pr_num, target_ref)
412+
merge_hash = merge_pr(pr_num, target_ref, title, body, pr_repo_desc)
411413

412414
pick_prompt = "Would you like to pick %s into another branch?" % merge_hash
413415
while raw_input("\n%s (y/n): " % pick_prompt).lower() == "y":

0 commit comments

Comments
 (0)