BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
ba1fcf36
Commit
ba1fcf36
authored
Mar 14, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added commits and merge request diffs to export
parent
5fbcfab6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
import_export.rb
app/services/projects/import_export.rb
+10
-2
project_tree_saver_spec.rb
...ervices/projects/import_export/project_tree_saver_spec.rb
+8
-0
No files found.
app/services/projects/import_export.rb
View file @
ba1fcf36
...
...
@@ -11,13 +11,21 @@ module Projects
end
def
project_tree
%i(issues
merge_requests labels milestones snippets releases events commit_statuses)
+
members
%i(issues
labels milestones snippets releases events)
+
[
members
,
merge_requests
,
commit_statuses
]
end
private
def
merge_requests
{
merge_requests:
{
include: :merge_request_diff
}
}
end
def
commit_statuses
{
commit_statuses:
{
include: :commit
}
}
end
def
members
[{
project_members:
{
include:
[
user:
{
only:
[
:id
,
:email
,
:username
]
}]
}
}]
{
project_members:
{
include:
[
user:
{
only:
[
:id
,
:email
,
:username
]
}]
}
}
end
def
storage_path
...
...
spec/services/projects/import_export/project_tree_saver_spec.rb
View file @
ba1fcf36
...
...
@@ -85,6 +85,14 @@ describe Projects::ImportExport::ProjectTreeSaver, services: true do
it
'has project members'
do
expect
(
saved_project_json
[
'project_members'
]).
not_to
be_empty
end
it
'has merge requests diffs'
do
expect
(
saved_project_json
[
'merge_requests'
].
first
[
'merge_request_diff'
]).
not_to
be_empty
end
it
'has ci commits'
do
expect
(
saved_project_json
[
'commit_statuses'
].
first
[
'commit'
]).
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