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

Commit

Permalink
Merge pull request #1978 from Florian3535/feature/Add-ContainerRegist…
Browse files Browse the repository at this point in the history
…rySize

Add `ContainerRegistrySize` field to `Statistics` struct
  • Loading branch information
svanharmelen authored Aug 2, 2024
2 parents acd2c6d + 2345490 commit 3ba94c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
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

0 comments on commit 3ba94c8

Please sign in to comment.