Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
columns = ['Github organization and project (if applicable)', 'branch']
projects = projects[columns].values
# Remove missing projects
projects = [ii.split('/') + [br] for ii, br in projects if isinstance(ii, str)]
# Remove non GH projects
projects = [ii for ii in projects if len(ii) == 3]
# Iterate projects and retrieve its latest info
print('Updating commits for %s projects' % len(projects))
exceptions = []
for user, project, branch in projects:
try:
branch = None if isinstance(branch, float) else branch
commits_.update_commits(user, project, auth,
since=since, branch=branch)
issues_.update_issues(user, project, auth,
since=since, state='all')
except Exception as e:
exceptions.append(project)
print('Finished updating commits.\nFailed for: {}'.format(exceptions))