MCPcopy Create free account
hub / github.com/ipython/ipython / merge_pr

Function merge_pr

tools/git-mpr.py:43–63  ·  view source on GitHub ↗

try to merge the branch of PR `num` into current branch

(num)

Source from the content-addressed store, hash-verified

41
42
43def merge_pr(num):
44 """ try to merge the branch of PR `num` into current branch
45 """
46 # Get Github authorisation first, so that the user is prompted straight away
47 # if their login is needed.
48
49 pr = gh_api.get_pull_request(gh_project, num)
50 repo = pr['head']['repo']['clone_url']
51
52
53 branch = pr['head']['ref']
54 mergeable = merge_branch(repo=repo,
55 branch=branch,
56 )
57 if not mergeable :
58 cmd = "git pull "+repo+" "+branch
59 not_merged[str(num)] = cmd
60 print("==============================================================================")
61 print("Something went wrong merging this branch, you can try it manually by running :")
62 print(cmd)
63 print("==============================================================================")
64
65
66def main(*args):

Callers 1

mainFunction · 0.85

Calls 1

merge_branchFunction · 0.85

Tested by

no test coverage detected