Commit 12d1ff85 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

update forges, and do not consider gitlab projects without default branches

parent c1f252e6
Pipeline #1913 failed with stages
in 56 seconds
......@@ -3,8 +3,8 @@ from import call_command
from import BaseCommand
from django.db.models import F, Q
from rainboard.models import Branch, Project, Repo, Robotpkg
from rainboard.utils import update_robotpkg, SOURCES
from rainboard.models import Branch, Forge, Project, Repo, Robotpkg
from rainboard.utils import SOURCES, update_robotpkg
class Command(BaseCommand):
......@@ -15,6 +15,11 @@ class Command(BaseCommand):
if int(options['verbosity']) > 1:
self.stdout.write(message)'updating forges')
for forge in Forge.objects.order_by('source'):' updating {forge}')
log(f'\nUpdating all repos\n')
for repo in Repo.objects.all():
log(f' {repo}')
......@@ -865,6 +865,8 @@ def get_default_forge(project):
def update_gitlab(forge, data):
if 'default_branch' not in data:
return'update {data["name"]} from {forge}')
public = data['visibility'] not in ['private', 'internal']
project, created = Project.objects.get_or_create(
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment