Skip to content

Commit

Permalink
Merge pull request #1933 from heidiberry/add-container-registry-status
Browse files Browse the repository at this point in the history
Add container registry status to response body
  • Loading branch information
svanharmelen committed May 5, 2024
2 parents 32950b3 + ffe1971 commit ca11f5c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions container_registry.go
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
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

0 comments on commit ca11f5c

Please sign in to comment.