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
6f74c7d4
Commit
6f74c7d4
authored
Apr 12, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix export commits stuff
parent
3b99e4ae
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
10 deletions
+11
-10
app/services/projects/import_export/import_export.yml
app/services/projects/import_export/import_export.yml
+2
-2
app/services/projects/import_export/project_tree_saver.rb
app/services/projects/import_export/project_tree_saver.rb
+1
-1
spec/services/projects/import_export/project_tree_saver_spec.rb
...ervices/projects/import_export/project_tree_saver_spec.rb
+8
-7
No files found.
app/services/projects/import_export/import_export.yml
View file @
6f74c7d4
...
...
@@ -12,8 +12,8 @@
- :merge_requests:
- :merge_request_diff
- :notes
- :c
ommit_statuse
s:
- :
commit
- :c
i_commit
s:
- :
statuses
:attributes_only:
:project:
...
...
app/services/projects/import_export/project_tree_saver.rb
View file @
6f74c7d4
...
...
@@ -20,7 +20,7 @@ module Projects
File
.
write
(
full_path
,
project_json_tree
)
true
rescue
#TODO: handle error
#
TODO: handle error
false
end
...
...
spec/services/projects/import_export/project_tree_saver_spec.rb
View file @
6f74c7d4
...
...
@@ -20,9 +20,10 @@ describe Projects::ImportExport::ProjectTreeSaver, services: true do
merge_requests:
[
merge_request
],
labels:
[
label
],
snippets:
[
snippet
],
releases:
[
release
]
,
commit_statuses:
[
commit_status
]
)
releases:
[
release
]
)
end
let!
(
:ci_commit
)
{
create
(
:ci_commit
,
project:
project
,
sha:
merge_request
.
last_commit
.
id
,
ref:
merge_request
.
source_branch
,
statuses:
[
commit_status
])
}
let!
(
:milestone
)
{
create
(
:milestone
,
title:
"Milestone v1.2"
,
project:
project
)
}
let
(
:export_path
)
{
"
#{
Dir
::
tmpdir
}
/project_tree_saver_spec"
}
let
(
:shared
)
{
Projects
::
ImportExport
::
Shared
.
new
(
relative_path:
project
.
path_with_namespace
)
}
...
...
@@ -86,10 +87,6 @@ describe Projects::ImportExport::ProjectTreeSaver, services: true do
expect
(
saved_project_json
[
'issues'
].
first
[
'notes'
]).
not_to
be_empty
end
it
'has commit statuses'
do
expect
(
saved_project_json
[
'commit_statuses'
]).
not_to
be_empty
end
it
'has project members'
do
expect
(
saved_project_json
[
'project_members'
]).
not_to
be_empty
end
...
...
@@ -102,8 +99,12 @@ describe Projects::ImportExport::ProjectTreeSaver, services: true do
expect
(
saved_project_json
[
'merge_requests'
].
first
[
'notes'
]).
not_to
be_empty
end
it
'has commit statuses'
do
expect
(
saved_project_json
[
'ci_commits'
].
first
[
'statuses'
]).
not_to
be_empty
end
it
'has ci commits'
do
expect
(
saved_project_json
[
'c
ommit_statuses'
].
first
[
'commit
'
]).
not_to
be_empty
expect
(
saved_project_json
[
'c
i_commits
'
]).
not_to
be_empty
end
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