summaryrefslogtreecommitdiff
path: root/lorrycontroller/gitlab.py
diff options
context:
space:
mode:
Diffstat (limited to 'lorrycontroller/gitlab.py')
-rw-r--r--lorrycontroller/gitlab.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/lorrycontroller/gitlab.py b/lorrycontroller/gitlab.py
index 4f70f0a..eda9c9d 100644
--- a/lorrycontroller/gitlab.py
+++ b/lorrycontroller/gitlab.py
@@ -66,6 +66,8 @@ class GitlabDownstream(hosts.DownstreamHost):
self.gl = _init_gitlab(host, app_settings['gitlab-private-token'])
+ self._visibility = app_settings['downstream-visibility']
+
def prepare_repo(self, repo_path, metadata):
try:
@@ -101,7 +103,11 @@ class GitlabDownstream(hosts.DownstreamHost):
except gitlab.GitlabGetError as e:
if e.response_code != 404:
raise
- data = {'name': group_name, 'path': group_name}
+ data = {
+ 'name': group_name,
+ 'path': group_name,
+ 'visibility': self._visibility,
+ }
if parent_group is not None:
data['parent_id'] = parent_group.id
group = self.gl.groups.create(data)
@@ -109,7 +115,7 @@ class GitlabDownstream(hosts.DownstreamHost):
project = {
'name': path_comps[-1],
- 'public': True,
+ 'visibility': self._visibility,
'merge_requests_enabled': False,
'namespace_id': group.id,
'default_branch': metadata.get('head'),