Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-09-01 01:10:00 +0300
committerRuben Davila <rdavila84@gmail.com>2016-09-01 01:11:58 +0300
commit7518a8403966558bf2a1f2238a6a1efd66f9837d (patch)
treee717102fab336282f282a45411e492eec50e5153 /lib
parentf21797e1c793866def10006507fb82076969c0f3 (diff)
Merge branch 'gh-importer-use-default-project-visibility-for-non-private-projects' into 'master'
GitHub importer use default project visibility for non-private projects ## What does this MR do? GitHub importer use the `Default Project Visibility` setting for all non-private projects. ## Why was this MR needed? This allow users to import projects when `Public` visibility is restricted. ## What are the relevant issue numbers? Fixes #21437 See merge request !6023
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/github_import/project_creator.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/github_import/project_creator.rb b/lib/gitlab/github_import/project_creator.rb
index f4221003db5..8237fe104d6 100644
--- a/lib/gitlab/github_import/project_creator.rb
+++ b/lib/gitlab/github_import/project_creator.rb
@@ -17,7 +17,7 @@ module Gitlab
path: repo.name,
description: repo.description,
namespace_id: namespace.id,
- visibility_level: repo.private ? Gitlab::VisibilityLevel::PRIVATE : Gitlab::VisibilityLevel::PUBLIC,
+ visibility_level: repo.private ? Gitlab::VisibilityLevel::PRIVATE : ApplicationSetting.current.default_project_visibility,
import_type: "github",
import_source: repo.full_name,
import_url: repo.clone_url.sub("https://", "https://#{@session_data[:github_access_token]}@"),