Skip to content

Commit

Permalink
converting public to visibility
Browse files Browse the repository at this point in the history
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 samrocketman#118

(cherry picked from commit 3ff356a)
  • Loading branch information
cdenneen committed Feb 28, 2019
1 parent c4044b3 commit b5c7706
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/manage_gitlab_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit b5c7706

Please sign in to comment.