def delete_branch(pr, session):
 refs_url = pr['head']['repo']['git_refs_url']
 branch_url = refs_url.replace('{/sha}', ('/heads/' + pr['head']['ref']))
 return session.delete(branch_url)

def delete_branch ( pr , session ) : refs_url = pr [ 'head' ] [ 'repo' ] [ 'git_refs_url' ] branch_url = refs_url . replace ( '{/sha}' , ( '/heads/' + pr [ 'head' ] [ 'ref' ] ) ) return session . delete ( branch_url )
launch the delete branch dialog .