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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
338f1eaf
Commit
338f1eaf
authored
Dec 20, 2017
by
Zeger-Jan van de Weg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate to Project#empty_repo?
parent
f5290c97
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
changelogs/unreleased/zj-empty-repo-importer.yml
changelogs/unreleased/zj-empty-repo-importer.yml
+5
-0
lib/gitlab/github_import/importer/repository_importer.rb
lib/gitlab/github_import/importer/repository_importer.rb
+1
-1
spec/lib/gitlab/github_import/importer/repository_importer_spec.rb
...gitlab/github_import/importer/repository_importer_spec.rb
+4
-4
No files found.
changelogs/unreleased/zj-empty-repo-importer.yml
0 → 100644
View file @
338f1eaf
---
title
:
Fix GitHub importer using removed interface
merge_request
:
author
:
type
:
fixed
lib/gitlab/github_import/importer/repository_importer.rb
View file @
338f1eaf
...
...
@@ -29,7 +29,7 @@ module Gitlab
# this code, e.g. because we had to retry this job after
# `import_wiki?` raised a rate limit error. In this case we'll skip
# re-importing the main repository.
if
project
.
repository
.
empty_repo?
if
project
.
empty_repo?
import_repository
else
true
...
...
spec/lib/gitlab/github_import/importer/repository_importer_spec.rb
View file @
338f1eaf
...
...
@@ -70,7 +70,7 @@ describe Gitlab::GithubImport::Importer::RepositoryImporter do
describe
'#execute'
do
it
'imports the repository and wiki'
do
expect
(
repository
)
expect
(
project
)
.
to
receive
(
:empty_repo?
)
.
and_return
(
true
)
...
...
@@ -93,7 +93,7 @@ describe Gitlab::GithubImport::Importer::RepositoryImporter do
end
it
'does not import the repository if it already exists'
do
expect
(
repository
)
expect
(
project
)
.
to
receive
(
:empty_repo?
)
.
and_return
(
false
)
...
...
@@ -115,7 +115,7 @@ describe Gitlab::GithubImport::Importer::RepositoryImporter do
end
it
'does not import the wiki if it is disabled'
do
expect
(
repository
)
expect
(
project
)
.
to
receive
(
:empty_repo?
)
.
and_return
(
true
)
...
...
@@ -137,7 +137,7 @@ describe Gitlab::GithubImport::Importer::RepositoryImporter do
end
it
'does not import the wiki if the repository could not be imported'
do
expect
(
repository
)
expect
(
project
)
.
to
receive
(
:empty_repo?
)
.
and_return
(
true
)
...
...
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