#NEWLINE# def retrieve_main_branch( self ) : #NEWLINE# #INDENT# response = requests . get ( ( self . MAIN_BRANCH_URL % dict ( owner = self . owner , repo_slug = self . repo_slug ) ) ) #NEWLINE# assert ( 200 == self . status_code ) , 'Bitbucket API request failed' #NEWLINE# self . branch = response . json ( ) [ 'name' ]