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

Add container registry status to response body #1933

Merged
merged 2 commits into from
May 5, 2024
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 container_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ type RegistryRepository struct {
Location string `json:"location"`
CreatedAt *time.Time `json:"created_at"`
CleanupPolicyStartedAt *time.Time `json:"cleanup_policy_started_at"`
Status *ContainerRegistryStatus `json:"status"`
TagsCount int `json:"tags_count"`
Tags []*RegistryRepositoryTag `json:"tags"`
}
Expand Down
16 changes: 16 additions & 0 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,22 @@ func BuildState(v BuildStateValue) *BuildStateValue {
return Ptr(v)
}

// ContainerRegistryStatus represents the status of a Container Registry.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/container_registry.html#list-registry-repositories
type ContainerRegistryStatus string

// ContainerRegistryStatus represents all valid statuses of a Container Registry.
//
// Undocumented, see code at:
// https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/models/container_repository.rb?ref_type=heads#L35
const (
ContainerRegistryStatusDeleteScheduled ContainerRegistryStatus = "delete_scheduled"
ContainerRegistryStatusDeleteFailed ContainerRegistryStatus = "delete_failed"
ContainerRegistryStatusDeleteOngoing ContainerRegistryStatus = "delete_ongoing"
)

// DeploymentApprovalStatus represents a Gitlab deployment approval status.
type DeploymentApprovalStatus string

Expand Down