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
dd40a4be
Commit
dd40a4be
authored
Mar 31, 2021
by
Kassio Borges
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BulkImports: Import milestone iid
Related to:
https://gitlab.com/gitlab-org/gitlab/-/issues/326157
parent
4520cd98
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
5 deletions
+13
-5
changelogs/unreleased/kassio-bulkimports-import-milestone-iid.yml
...gs/unreleased/kassio-bulkimports-import-milestone-iid.yml
+5
-0
doc/user/group/import/index.md
doc/user/group/import/index.md
+1
-0
lib/bulk_imports/groups/graphql/get_milestones_query.rb
lib/bulk_imports/groups/graphql/get_milestones_query.rb
+1
-0
spec/lib/bulk_imports/groups/pipelines/milestones_pipeline_spec.rb
...bulk_imports/groups/pipelines/milestones_pipeline_spec.rb
+6
-5
No files found.
changelogs/unreleased/kassio-bulkimports-import-milestone-iid.yml
0 → 100644
View file @
dd40a4be
---
title
:
'
BulkImports:
Import
milestone
iid'
merge_request
:
58107
author
:
type
:
changed
doc/user/group/import/index.md
View file @
dd40a4be
...
...
@@ -57,6 +57,7 @@ The following resources are migrated to the target instance:
-
due date
-
created at
-
updated at
-
iid (
[
Introduced in 13.11
](
https://gitlab.com/gitlab-org/gitlab/-/issues/326157
)
)
-
Iterations (
[
Introduced in 13.10
](
https://gitlab.com/gitlab-org/gitlab/-/issues/292428
)
)
-
iid
-
title
...
...
lib/bulk_imports/groups/graphql/get_milestones_query.rb
View file @
dd40a4be
...
...
@@ -16,6 +16,7 @@ module BulkImports
has_next_page: hasNextPage
}
nodes {
iid
title
description
state
...
...
spec/lib/bulk_imports/groups/pipelines/milestones_pipeline_spec.rb
View file @
dd40a4be
...
...
@@ -30,8 +30,8 @@ RSpec.describe BulkImports::Groups::Pipelines::MilestonesPipeline do
describe
'#run'
do
it
'imports group milestones'
do
first_page
=
extracted_data
(
title:
'milestone1'
,
has_next_page:
true
)
last_page
=
extracted_data
(
title:
'milestone2'
)
first_page
=
extracted_data
(
title:
'milestone1'
,
iid:
1
,
has_next_page:
true
)
last_page
=
extracted_data
(
title:
'milestone2'
,
iid:
2
)
allow_next_instance_of
(
BulkImports
::
Common
::
Extractors
::
GraphqlExtractor
)
do
|
extractor
|
allow
(
extractor
)
...
...
@@ -96,10 +96,11 @@ RSpec.describe BulkImports::Groups::Pipelines::MilestonesPipeline do
end
end
def
milestone_data
(
title
)
def
milestone_data
(
title
,
iid:
1
)
{
'title'
=>
title
,
'description'
=>
'desc'
,
'iid'
=>
iid
,
'state'
=>
'closed'
,
'start_date'
=>
'2020-10-21'
,
'due_date'
=>
'2020-10-22'
,
...
...
@@ -108,14 +109,14 @@ RSpec.describe BulkImports::Groups::Pipelines::MilestonesPipeline do
}
end
def
extracted_data
(
title
:,
has_next_page:
false
)
def
extracted_data
(
title
:,
iid:
1
,
has_next_page:
false
)
page_info
=
{
'has_next_page'
=>
has_next_page
,
'next_page'
=>
has_next_page
?
'cursor'
:
nil
}
BulkImports
::
Pipeline
::
ExtractedData
.
new
(
data:
milestone_data
(
title
),
data:
milestone_data
(
title
,
iid:
iid
),
page_info:
page_info
)
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