def merge_pr(num):
 pr = gh_api.get_pull_request(gh_project, num)
 repo = pr['head']['repo']['clone_url']
 branch = pr['head']['ref']
 mergeable = merge_branch(repo=repo, branch=branch)
 if (not mergeable):
  cmd = ((('git pull ' + repo) + ' ') + branch)
  not_merged[str(num)] = cmd
  print '=============================================================================='
  print 'Something went wrong merging this branch, you can try it manually by runngin :'
  print cmd
  print '=============================================================================='

def merge_pr ( num ) : pr = gh_api . get_pull_request ( gh_project , num ) repo = pr [ 'head' ] [ 'repo' ] [ 'clone_url' ] branch = pr [ 'head' ] [ 'ref' ] mergeable = merge_branch ( repo = repo , branch = branch ) if ( not mergeable ) : cmd = ( ( ( 'git pull ' + repo ) + ' ' ) + branch ) not_merged [ str ( num ) ] = cmd print '==============================================================================' print 'Something went wrong merging this branch, you can try it manually by runngin :' print cmd print '=============================================================================='
try to merge the branch of pr num into current branch .