Skip to content

Commit 5a2151f

Browse files
cleanup: removes unsupported enum values for Gitlab comment_strategy
Removed two unsupported enum values from the GitLab comment_strategy field in the CRD definition and associated structs These values were not handled by the current implementation. Hence this change ensures that only supported options are exposed. Signed-off-by: PuneetPunamiya <[email protected]>
1 parent da83cb5 commit 5a2151f

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

config/300-repositories.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,12 +349,9 @@ spec:
349349
description: |-
350350
CommentStrategy defines how GitLab comments are handled for pipeline results.
351351
Options:
352-
- 'status-comment': Posts a single comment and updates it with pipeline results
353-
- 'pipeline-runs-comment': Creates a new comment for each PipelineRun
354352
- 'disable_all': Disables all comments on merge requests
355353
enum:
356-
- status-comment
357-
- pipeline-runs-comment
354+
- ""
358355
- disable_all
359356
type: string
360357
type: object

pkg/apis/pipelinesascode/v1alpha1/types.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,9 @@ type Settings struct {
163163
type GitlabSettings struct {
164164
// CommentStrategy defines how GitLab comments are handled for pipeline results.
165165
// Options:
166-
// - 'status-comment': Posts a single comment and updates it with pipeline results
167-
// - 'pipeline-runs-comment': Creates a new comment for each PipelineRun
168166
// - 'disable_all': Disables all comments on merge requests
169167
// +optional
170-
// +kubebuilder:validation:Enum=status-comment;pipeline-runs-comment;disable_all
168+
// +kubebuilder:validation:Enum="";disable_all
171169
CommentStrategy string `json:"comment_strategy,omitempty"`
172170
}
173171

0 commit comments

Comments
 (0)