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
Léo-Paul Géneau
gitlab-ce
Commits
d24ea868
Commit
d24ea868
authored
Feb 20, 2019
by
Diana Stanley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Capture due date when importing milestones from Github
parent
bc881b84
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
0 deletions
+12
-0
changelogs/unreleased/57612-github-importer-ignores-milestone-due_date.yml
...ased/57612-github-importer-ignores-milestone-due_date.yml
+5
-0
lib/gitlab/github_import/importer/milestones_importer.rb
lib/gitlab/github_import/importer/milestones_importer.rb
+1
-0
spec/lib/gitlab/github_import/importer/milestones_importer_spec.rb
...gitlab/github_import/importer/milestones_importer_spec.rb
+6
-0
No files found.
changelogs/unreleased/57612-github-importer-ignores-milestone-due_date.yml
0 → 100644
View file @
d24ea868
---
title
:
Capture due date when importing milestones from Github
merge_request
:
25182
author
:
dstanley
type
:
changed
lib/gitlab/github_import/importer/milestones_importer.rb
View file @
d24ea868
...
@@ -42,6 +42,7 @@ module Gitlab
...
@@ -42,6 +42,7 @@ module Gitlab
description:
milestone
.
description
,
description:
milestone
.
description
,
project_id:
project
.
id
,
project_id:
project
.
id
,
state:
state_for
(
milestone
),
state:
state_for
(
milestone
),
due_date:
milestone
.
due_on
.
to_date
,
created_at:
milestone
.
created_at
,
created_at:
milestone
.
created_at
,
updated_at:
milestone
.
updated_at
updated_at:
milestone
.
updated_at
}
}
...
...
spec/lib/gitlab/github_import/importer/milestones_importer_spec.rb
View file @
d24ea868
...
@@ -4,6 +4,7 @@ describe Gitlab::GithubImport::Importer::MilestonesImporter, :clean_gitlab_redis
...
@@ -4,6 +4,7 @@ describe Gitlab::GithubImport::Importer::MilestonesImporter, :clean_gitlab_redis
let
(
:project
)
{
create
(
:project
,
import_source:
'foo/bar'
)
}
let
(
:project
)
{
create
(
:project
,
import_source:
'foo/bar'
)
}
let
(
:client
)
{
double
(
:client
)
}
let
(
:client
)
{
double
(
:client
)
}
let
(
:importer
)
{
described_class
.
new
(
project
,
client
)
}
let
(
:importer
)
{
described_class
.
new
(
project
,
client
)
}
let
(
:due_on
)
{
Time
.
new
(
2017
,
2
,
1
,
12
,
00
)
}
let
(
:created_at
)
{
Time
.
new
(
2017
,
1
,
1
,
12
,
00
)
}
let
(
:created_at
)
{
Time
.
new
(
2017
,
1
,
1
,
12
,
00
)
}
let
(
:updated_at
)
{
Time
.
new
(
2017
,
1
,
1
,
12
,
15
)
}
let
(
:updated_at
)
{
Time
.
new
(
2017
,
1
,
1
,
12
,
15
)
}
...
@@ -14,6 +15,7 @@ describe Gitlab::GithubImport::Importer::MilestonesImporter, :clean_gitlab_redis
...
@@ -14,6 +15,7 @@ describe Gitlab::GithubImport::Importer::MilestonesImporter, :clean_gitlab_redis
title:
'1.0'
,
title:
'1.0'
,
description:
'The first release'
,
description:
'The first release'
,
state:
'open'
,
state:
'open'
,
due_on:
due_on
,
created_at:
created_at
,
created_at:
created_at
,
updated_at:
updated_at
updated_at:
updated_at
)
)
...
@@ -98,6 +100,10 @@ describe Gitlab::GithubImport::Importer::MilestonesImporter, :clean_gitlab_redis
...
@@ -98,6 +100,10 @@ describe Gitlab::GithubImport::Importer::MilestonesImporter, :clean_gitlab_redis
expect
(
milestone_hash
[
:state
]).
to
eq
(
:active
)
expect
(
milestone_hash
[
:state
]).
to
eq
(
:active
)
end
end
it
'includes the due date'
do
expect
(
milestone_hash
[
:due_date
]).
to
eq
(
due_on
.
to_date
)
end
it
'includes the created timestamp'
do
it
'includes the created timestamp'
do
expect
(
milestone_hash
[
:created_at
]).
to
eq
(
created_at
)
expect
(
milestone_hash
[
:created_at
]).
to
eq
(
created_at
)
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