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
8476f91a
Commit
8476f91a
authored
Jun 03, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP - added missing notes, trying to fix specs
parent
9d0038f2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
5 deletions
+28
-5
app/models/ci/commit.rb
app/models/ci/commit.rb
+4
-0
lib/gitlab/import_export/import_export.yml
lib/gitlab/import_export/import_export.yml
+3
-1
spec/lib/gitlab/import_export/project_tree_saver_spec.rb
spec/lib/gitlab/import_export/project_tree_saver_spec.rb
+21
-4
No files found.
app/models/ci/commit.rb
View file @
8476f91a
...
...
@@ -179,5 +179,9 @@ module Ci
self
.
yaml_errors
=
error
update_state
end
def
notes
Note
.
for_commit_id
(
valid_commit_sha
)
end
end
end
lib/gitlab/import_export/import_export.yml
View file @
8476f91a
...
...
@@ -5,7 +5,9 @@ project_tree:
:author
-
:labels
-
:milestones
-
:snippets
-
snippets
:
-
notes
:
:author
-
:releases
-
:events
-
project_members
:
...
...
spec/lib/gitlab/import_export/project_tree_saver_spec.rb
View file @
8476f91a
...
...
@@ -53,6 +53,10 @@ describe Gitlab::ImportExport::ProjectTreeSaver, services: true do
expect
(
saved_project_json
[
'snippets'
]).
not_to
be_empty
end
it
'has snippet notes'
do
expect
(
saved_project_json
[
'snippets'
].
first
[
'notes'
]).
not_to
be_empty
end
it
'has releases'
do
expect
(
saved_project_json
[
'releases'
]).
not_to
be_empty
end
...
...
@@ -96,6 +100,10 @@ describe Gitlab::ImportExport::ProjectTreeSaver, services: true do
it
'has ci commits'
do
expect
(
saved_project_json
[
'ci_commits'
]).
not_to
be_empty
end
it
'has ci commits notes'
do
expect
(
saved_project_json
[
'ci_commits'
].
first
[
'notes'
]).
not_to
be_empty
end
end
end
...
...
@@ -115,11 +123,20 @@ describe Gitlab::ImportExport::ProjectTreeSaver, services: true do
releases:
[
release
]
)
ci_commit
=
create
(
:ci_commit
,
project:
project
,
sha:
merge_request
.
last_commit
.
id
,
ref:
merge_request
.
source_branch
)
create
(
:ci_build
,
commit:
ci_commit
)
commit_status
=
create
(
:commit_status
,
project:
project
)
ci_commit
=
create
(
:ci_commit
,
project:
project
,
sha:
merge_request
.
last_commit
.
id
,
ref:
merge_request
.
source_branch
,
statuses:
[
commit_status
])
create
(
:ci_build
,
commit:
ci_commit
,
project:
project
)
create
(
:milestone
,
project:
project
)
create
(
:note
,
noteable:
issue
)
create
(
:note
,
noteable:
merge_request
)
create
(
:note
,
noteable:
issue
,
project:
project
)
create
(
:note
,
noteable:
merge_request
,
project:
project
)
create
(
:note
,
noteable:
ci_commit
,
project:
project
)
create
(
:note
,
noteable:
snippet
,
project:
project
)
project
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