#NEWLINE# def fetch_issues( self ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# iterator = self . repo . iter_issues #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# iterator = self . repo . issues #NEWLINE# #UNINDENT# for issue in iterator ( state = 'all' ) : #NEWLINE# #INDENT# if getattr ( issue , 'pull_request' , None ) : #NEWLINE# #INDENT# msg = ( 'Skipping pull request %s: %s' % ( issue . id , issue . title ) ) #NEWLINE# logger . debug ( msg ) #NEWLINE# continue #NEWLINE# #UNINDENT# msg = ( 'Skipping pull request %s: %s' % ( issue . id , issue . title ) ) #NEWLINE# logger . debug ( msg ) #NEWLINE# issue_data = { #NEWLINE# #INDENT# 'source_id' : issue . id , #NEWLINE# 'priority_id' : 1 , #NEWLINE# #UNINDENT# } #NEWLINE# if getattr ( issue , 'title' , None ) : #NEWLINE# #INDENT# issue_data [ 'subject' ] = issue . title #NEWLINE# #UNINDENT# if getattr ( issue , 'body' , None ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# issue_data [ 'description' ] = issue . body_text #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# issue_data [ 'description' ] = issue . body #NEWLINE# #UNINDENT# #UNINDENT# if getattr ( issue , 'tracker' , None ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# if getattr ( issue , 'state' , None ) : #NEWLINE# #INDENT# issue_data [ 'status_name' ] = issue . state . title ( ) #NEWLINE# #UNINDENT# if getattr ( issue , 'priority' , None ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# if getattr ( issue , 'done_ratio' , None ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# if getattr ( issue , 'story_points' , None ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# if getattr ( issue , 'milestone' , None ) : #NEWLINE# #INDENT# issue_data [ 'fixed_version_id' ] = issue . milestone . number #NEWLINE# issue_data [ 'version_name' ] = issue . milestone . title #NEWLINE# #UNINDENT# if getattr ( issue , 'assignee' , None ) : #NEWLINE# #INDENT# issue_data [ 'assigned_to_id' ] = issue . assignee . id #NEWLINE# login = issue . assignee . login #NEWLINE# issue_data [ 'assigned_to_login' ] = login #NEWLINE# #UNINDENT# ( yield issue_data )