Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Add ContainerRegistrySize field to Statistics struct #1978

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions projects.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ type Statistics struct {
PackagesSize int64 `json:"packages_size"`
SnippetsSize int64 `json:"snippets_size"`
UploadsSize int64 `json:"uploads_size"`
ContainerRegistrySize int64 `json:"container_registry_size"`
}

func (s Project) String() string {
Expand Down
4 changes: 3 additions & 1 deletion projects_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,8 @@ func TestGetProjectWithOptions(t *testing.T) {
"pipeline_artifacts_size": 0,
"packages_size": 238906167,
"snippets_size": 146800,
"uploads_size": 6523619
"uploads_size": 6523619,
"container_registry_size": 284453
}}`)
})
want := &Project{ID: 1, Statistics: &Statistics{
Expand All @@ -455,6 +456,7 @@ func TestGetProjectWithOptions(t *testing.T) {
PackagesSize: 238906167,
SnippetsSize: 146800,
UploadsSize: 6523619,
ContainerRegistrySize: 284453,
}}

project, _, err := client.Projects.GetProject(1, &GetProjectOptions{Statistics: Ptr(true)})
Expand Down