Commit cd735822 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

exclude release projects

parent f72f71fc
......@@ -17,7 +17,8 @@ SKIP_LABEL = 'skip dashboard' # Issues and prs with this label will not be adde
def update_issues_pr():
print('\nUpdating issues and pull requests')
for project in Project.objects.filter(archived=False, main_namespace__from_gepetto=True):
for project in Project.objects.filter(archived=False,
main_namespace__from_gepetto=True).exclude(name__endswith='release'):
try:
gh = project.github()
main_repo = project.repo_set.filter(namespace=project.main_namespace, forge__source=SOURCES.github).first()
......@@ -70,7 +71,8 @@ class Command(BaseCommand):
update_robotpkg(settings.RAINBOARD_RPKG)
log('\nUpdating gepetto projects\n')
for project in Project.objects.filter(archived=False, main_namespace__from_gepetto=True):
for project in Project.objects.filter(archived=False,
main_namespace__from_gepetto=True).exclude(name__endswith='release'):
log(f' {project}')
project.update(only_main_branches=False)
......
......@@ -177,7 +177,7 @@ class Forge(Links, NamedModel):
for data in self.api_list('/projects'):
update_gitlab(self, data)
for orphan in Project.objects.filter(main_namespace=None):
for orphan in Project.objects.filter(main_namespace=None).exclude(name__endswith='release'):
repo = orphan.repo_set.filter(forge__source=SOURCES.gitlab).first()
if repo:
update_gitlab(self, self.api_data(f'/projects/{repo.forked_from}'))
......
......@@ -35,7 +35,8 @@ class ProjectsView(SingleTableMixin, FilterView):
class GepettoProjectsView(ProjectsView):
queryset = models.Project.objects.filter(main_namespace__from_gepetto=True, archived=False)
queryset = models.Project.objects.filter(main_namespace__from_gepetto=True,
archived=False).exclude(name__endswith='release')
class ProjectView(DetailView):
......@@ -145,7 +146,8 @@ def docker(request):
def graph_svg(request):
with open('/tmp/graph', 'w') as f:
print('digraph { rankdir=LR;', file=f)
for project in models.Project.objects.filter(main_namespace__from_gepetto=True, archived=False):
for project in models.Project.objects.filter(main_namespace__from_gepetto=True,
archived=False).exclude(name__endswith='release'):
print(f'{{I{project.pk} [label="{project}" URL="{project.get_absolute_url()}"];}}', file=f)
for dep in models.Dependency.objects.filter(project__main_namespace__from_gepetto=True,
library__main_namespace__from_gepetto=True,
......
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