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
0aeef0af
Commit
0aeef0af
authored
Jun 30, 2020
by
Francisco Javier López
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add snippets_size to Group entity
parent
bf8f3cd8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
3 deletions
+11
-3
changelogs/unreleased/fj-224657-include-snippets-size-in-group-statistics.yml
...d/fj-224657-include-snippets-size-in-group-statistics.yml
+5
-0
doc/api/groups.md
doc/api/groups.md
+2
-1
lib/api/entities/group.rb
lib/api/entities/group.rb
+1
-0
spec/requests/api/groups_spec.rb
spec/requests/api/groups_spec.rb
+3
-2
No files found.
changelogs/unreleased/fj-224657-include-snippets-size-in-group-statistics.yml
0 → 100644
View file @
0aeef0af
---
title
:
Add snippets_size to Group entity
merge_request
:
35585
author
:
type
:
changed
doc/api/groups.md
View file @
0aeef0af
...
@@ -94,7 +94,8 @@ GET /groups?statistics=true
...
@@ -94,7 +94,8 @@ GET /groups?statistics=true
"wiki_size"
:
100
,
"wiki_size"
:
100
,
"lfs_objects_size"
:
123
,
"lfs_objects_size"
:
123
,
"job_artifacts_size"
:
57
,
"job_artifacts_size"
:
57
,
"packages_size"
:
0
"packages_size"
:
0
,
"snippets_size"
:
50
,
}
}
}
}
]
]
...
...
lib/api/entities/group.rb
View file @
0aeef0af
...
@@ -31,6 +31,7 @@ module API
...
@@ -31,6 +31,7 @@ module API
expose
:wiki_size
expose
:wiki_size
expose
:lfs_objects_size
expose
:lfs_objects_size
expose
:build_artifacts_size
,
as: :job_artifacts_size
expose
:build_artifacts_size
,
as: :job_artifacts_size
expose
:snippets_size
end
end
end
end
end
end
...
...
spec/requests/api/groups_spec.rb
View file @
0aeef0af
...
@@ -184,11 +184,12 @@ RSpec.describe API::Groups do
...
@@ -184,11 +184,12 @@ RSpec.describe API::Groups do
it
"includes statistics if requested"
do
it
"includes statistics if requested"
do
attributes
=
{
attributes
=
{
storage_size:
1158
,
storage_size:
2392
,
repository_size:
123
,
repository_size:
123
,
wiki_size:
456
,
wiki_size:
456
,
lfs_objects_size:
234
,
lfs_objects_size:
234
,
build_artifacts_size:
345
build_artifacts_size:
345
,
snippets_size:
1234
}.
stringify_keys
}.
stringify_keys
exposed_attributes
=
attributes
.
dup
exposed_attributes
=
attributes
.
dup
exposed_attributes
[
'job_artifacts_size'
]
=
exposed_attributes
.
delete
(
'build_artifacts_size'
)
exposed_attributes
[
'job_artifacts_size'
]
=
exposed_attributes
.
delete
(
'build_artifacts_size'
)
...
...
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