From b5c770664ca1daefd69dbf0403a140c7ba91292d Mon Sep 17 00:00:00 2001 From: Chris Denneen Date: Thu, 13 Dec 2018 20:29:56 -0500 Subject: [PATCH] converting public to visibility The original `true` or `false` setting for public used to set to repository visibility to private or public. This does exactly the same thing keeping the `public=false/true` configuration setting. Removing `public` configuration in favor of full `visibility` support (public, private, internal) will require additional work so for now this is a stop gap for #118 (cherry picked from commit 3ff356a2b9bc727485b1b6f9d72f56dc2e98b196) --- lib/manage_gitlab_project.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/manage_gitlab_project.py b/lib/manage_gitlab_project.py index d2557db..b135f7f 100755 --- a/lib/manage_gitlab_project.py +++ b/lib/manage_gitlab_project.py @@ -86,6 +86,10 @@ def transfer_project(src_project, group): return dest_project def createproject(pname): + if options.public: + visibility_level="public" + else: + visibility_level="private" if len(options.desc) == 0: if options.public: description="Public mirror of %s." % project_name @@ -99,7 +103,7 @@ def createproject(pname): 'merge_requests_enabled': options.merge, 'wiki_enabled': options.wiki, 'snippets_enabled': options.snippets, - 'public': options.public, + 'visibility': visibility_level, 'namespace_id': find_group(name=gitlab_namespace).id, } #make all project options lowercase boolean strings i.e. true instead of True