def list_root(self): github_lib = client.Github() open_issues = github_lib.issues.list() closed_issues = github_lib.issues.list(state='closed') ret = [] for issue in open_issues + closed_issues: ret.append(get_ticket_from_issue(issue)) return ret
# Config user = '******' token= '12efaff85b8e17f63ee835c5632b8cf0' repo = 'statsmodels/statsmodels' #repo = 'ipython/ipython' # Skip bugs with this status: # to_skip = set([u'fix_committed', u'incomplete']) to_skip = set() # Only label these importance levels: gh_importances = set([u'critical', u'high', u'low', u'medium', u'wishlist']) # Start script gh = client.Github(username=user, api_token=token) # Filter out the full LP bug dict to process only the ones we want bugs_todo = dict( (id, b) for (id, b) in bugs.iteritems() if not b.status in to_skip ) # Select which bug ids to run #bids = bugs_todo.keys()[50:100] # bids = bugs_todo.keys()[12:] bids = bugs_todo.keys() #bids = bids[:5]+[502787] # Start loop over bug ids and file them on Github nbugs = len(bids) gh_issues = [] # for reporting at the end
def get_ticket(self, ticket_id): github_lib = client.Github() issue = github_lib.issues.show(self.repo, ticket_id) return get_ticket_from_issue(issue)