Skip to content

Commit

Permalink
ARROW-6376: [Developer] Use target ref of PR when merging instead of …
Browse files Browse the repository at this point in the history
…hard-coding "master"

I just used this successfully to merge ARROW-6314 into the ARROW-6313-flatbuffer-alignment branch

https://github.com/apache/arrow/tree/ARROW-6313-flatbuffer-alignment

Closes #5220 from wesm/ARROW-6376 and squashes the following commits:

54723c7 <Wes McKinney> Use target ref of PR when merging

Authored-by: Wes McKinney <wesm+git@apache.org>
Signed-off-by: Wes McKinney <wesm+git@apache.org>
  • Loading branch information
wesm committed Aug 28, 2019
1 parent 443ac07 commit 63dbc12
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dev/merge_arrow_pr.py
Expand Up @@ -317,18 +317,18 @@ def _get_jira(self):

return JiraIssue(self.con, jira_id, project, self.cmd)

def merge(self, target_ref='master'):
def merge(self):
"""
merge the requested PR and return the merge hash
"""
pr_branch_name = "%s_MERGE_PR_%s" % (BRANCH_PREFIX, self.number)
target_branch_name = "%s_MERGE_PR_%s_%s" % (BRANCH_PREFIX,
self.number,
target_ref.upper())
self.target_ref.upper())
run_cmd("git fetch %s pull/%s/head:%s" % (self.git_remote,
self.number,
pr_branch_name))
run_cmd("git fetch %s %s:%s" % (self.git_remote, target_ref,
run_cmd("git fetch %s %s:%s" % (self.git_remote, self.target_ref,
target_branch_name))
run_cmd("git checkout %s" % target_branch_name)

Expand Down Expand Up @@ -415,7 +415,7 @@ def merge(self, target_ref='master'):
try:
push_cmd = ('git push %s %s:%s' % (self.git_remote,
target_branch_name,
target_ref))
self.target_ref))
if DEBUG:
print(push_cmd)
else:
Expand Down

0 comments on commit 63dbc12

Please sign in to comment.