Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (17 sloc) 886 Bytes
from django.db import transaction
from import BaseCommand
from zumanji.github import github
from zumanji.models import Project, Revision
class Command(BaseCommand):
help = 'Updates all revisions by hammering GitHub'
def handle(self, **options):
for project in Project.objects.filter(label__contains='/'):
print "Project %r" % project.label
for commit in github.iter_commits(project.github_user, project.github_repo):
print " Revision %r (%s; %s)" % (commit['sha'], commit['commit']['author']['name'],
rev, created = Revision.get_or_create(project, commit['sha'])
if not created and not
Something went wrong with that request. Please try again.