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
1bea1dec
Commit
1bea1dec
authored
Jun 14, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
a2b25874
286a5938
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
10 deletions
+16
-10
lib/gitlab/legacy_github_import/importer.rb
lib/gitlab/legacy_github_import/importer.rb
+6
-1
spec/lib/gitlab/legacy_github_import/importer_spec.rb
spec/lib/gitlab/legacy_github_import/importer_spec.rb
+10
-9
No files found.
lib/gitlab/legacy_github_import/importer.rb
View file @
1bea1dec
...
...
@@ -55,7 +55,12 @@ module Gitlab
import_pull_requests
import_issues
import_comments
(
:issues
)
import_comments
(
:pull_requests
)
# Gitea doesn't have an API endpoint for pull requests comments
unless
project
.
gitea_import?
import_comments
(
:pull_requests
)
end
import_wiki
# Gitea doesn't have a Release API yet
...
...
spec/lib/gitlab/legacy_github_import/importer_spec.rb
View file @
1bea1dec
...
...
@@ -13,21 +13,22 @@ describe Gitlab::LegacyGithubImport::Importer do
expected_called
=
[
:import_labels
,
:import_milestones
,
:import_pull_requests
,
:import_issues
,
:import_wiki
,
:import_releases
,
:handle_errors
:import_wiki
,
:import_releases
,
:handle_errors
,
[
:import_comments
,
:issues
],
[
:import_comments
,
:pull_requests
]
]
expected_called
-=
expected_not_called
aggregate_failures
do
expected_called
.
each
do
|
method_name
|
expect
(
importer
).
to
receive
(
method_name
)
expected_called
.
each
do
|
method_name
,
arg
|
base_expectation
=
proc
{
expect
(
importer
).
to
receive
(
method_name
)
}
arg
?
base_expectation
.
call
.
with
(
arg
)
:
base_expectation
.
call
end
expect
(
importer
).
to
receive
(
:import_comments
).
with
(
:issues
)
expect
(
importer
).
to
receive
(
:import_comments
).
with
(
:pull_requests
)
expected_not_called
.
each
do
|
method_name
|
expect
(
importer
).
not_to
receive
(
method_name
)
expected_not_called
.
each
do
|
method_name
,
arg
|
base_expectation
=
proc
{
expect
(
importer
).
not_to
receive
(
method_name
)
}
arg
?
base_expectation
.
call
.
with
(
arg
)
:
base_expectation
.
call
end
end
...
...
@@ -289,7 +290,7 @@ describe Gitlab::LegacyGithubImport::Importer do
end
it_behaves_like
'Gitlab::LegacyGithubImport::Importer#execute'
do
let
(
:expected_not_called
)
{
[
:import_releases
]
}
let
(
:expected_not_called
)
{
[
:import_releases
,
[
:import_comments
,
:pull_requests
]
]
}
end
it_behaves_like
'Gitlab::LegacyGithubImport::Importer#execute an error occurs'
it_behaves_like
'Gitlab::LegacyGithubImport unit-testing'
...
...
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