Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
26fdcf7b
Commit
26fdcf7b
authored
Apr 08, 2019
by
Daniel Wyatt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix GitHub project import visibility
parent
34f68b3e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
changelogs/unreleased/47327-fix-github-import-visibility.yml
changelogs/unreleased/47327-fix-github-import-visibility.yml
+5
-0
lib/gitlab/legacy_github_import/project_creator.rb
lib/gitlab/legacy_github_import/project_creator.rb
+1
-1
spec/lib/gitlab/legacy_github_import/project_creator_spec.rb
spec/lib/gitlab/legacy_github_import/project_creator_spec.rb
+2
-2
No files found.
changelogs/unreleased/47327-fix-github-import-visibility.yml
0 → 100644
View file @
26fdcf7b
---
title
:
Fix GitHub project import visibility
merge_request
:
author
:
Daniel Wyatt
type
:
fixed
lib/gitlab/legacy_github_import/project_creator.rb
View file @
26fdcf7b
...
@@ -37,7 +37,7 @@ module Gitlab
...
@@ -37,7 +37,7 @@ module Gitlab
end
end
def
visibility_level
def
visibility_level
visibility_level
=
repo
.
private
?
Gitlab
::
VisibilityLevel
::
PRIVATE
:
Gitlab
::
VisibilityLevel
::
PUBLIC
visibility_level
=
repo
.
private
?
Gitlab
::
VisibilityLevel
::
PRIVATE
:
@namespace
.
visibility_level
visibility_level
=
Gitlab
::
CurrentSettings
.
default_project_visibility
if
Gitlab
::
CurrentSettings
.
restricted_visibility_levels
.
include?
(
visibility_level
)
visibility_level
=
Gitlab
::
CurrentSettings
.
default_project_visibility
if
Gitlab
::
CurrentSettings
.
restricted_visibility_levels
.
include?
(
visibility_level
)
visibility_level
visibility_level
...
...
spec/lib/gitlab/legacy_github_import/project_creator_spec.rb
View file @
26fdcf7b
...
@@ -47,12 +47,12 @@ describe Gitlab::LegacyGithubImport::ProjectCreator do
...
@@ -47,12 +47,12 @@ describe Gitlab::LegacyGithubImport::ProjectCreator do
end
end
context
'when GitHub project is public'
do
context
'when GitHub project is public'
do
it
'sets project visibility to
public
'
do
it
'sets project visibility to
namespace visibility level
'
do
repo
.
private
=
false
repo
.
private
=
false
project
=
service
.
execute
project
=
service
.
execute
expect
(
project
.
visibility_level
).
to
eq
(
Gitlab
::
VisibilityLevel
::
PUBLIC
)
expect
(
project
.
visibility_level
).
to
eq
(
namespace
.
visibility_level
)
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment