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

populate Project.private

parent 6a31804c
......@@ -23,10 +23,13 @@ You can then go to http://localhost:8000
## TODO
- populate public/private field
- fix interaction between pagination & filtering
- retrieve dependencies
- classify system / rpkg
- get their version depending on the target os
- dockerfile
- generic Vs. using dependencies
- branches view:
- show forge / namespace
- pin MAIN_BRANCHES on top
- default order by -updated
......@@ -610,7 +610,9 @@ def get_default_forge(project):
def update_gitlab(forge, data):
logger.info(f'update {data["name"]} from {forge}')
project, created = Project.objects.get_or_create(name=data['name'], defaults={'main_forge': forge})
private = data['visibility'] in ['private', 'internal']
project, created = Project.objects.get_or_create(name=data['name'],
defaults={'main_forge': forge, 'private': private})
namespace, _ = Namespace.objects.get_or_create(slug=data['namespace']['path'],
defaults={'name': data['namespace']['name']})
repo, _ = Repo.objects.get_or_create(forge=forge, namespace=namespace, project=project,
......
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