From e7a00cc13aaf3f0f35cc8f6773759253fd6cbd34 Mon Sep 17 00:00:00 2001 From: tal-hason Date: Fri, 10 Jan 2025 08:18:22 +0000 Subject: [PATCH] update the source with the kent suggested regex expression --- api/v1alpha1/generated.proto | 2 +- api/v1alpha1/warehouse_types.go | 2 +- charts/kargo/resources/crds/kargo.akuity.io_warehouses.yaml | 2 +- ui/src/gen/schema/warehouses.kargo.akuity.io_v1alpha1.json | 2 +- ui/src/gen/v1alpha1/generated_pb.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/v1alpha1/generated.proto b/api/v1alpha1/generated.proto index 9dce6dd9b..142531465 100644 --- a/api/v1alpha1/generated.proto +++ b/api/v1alpha1/generated.proto @@ -472,7 +472,7 @@ message GitSubscription { // subscription is implicitly to the repository's default branch. // // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:Pattern=`^\w+([-\/]\w+)*(-\d+\.\d+)?$` + // +kubebuilder:validation:Pattern=`^\w+([-/\.]\w+)*$` optional string branch = 3; // StrictSemvers specifies whether only "strict" semver tags should be diff --git a/api/v1alpha1/warehouse_types.go b/api/v1alpha1/warehouse_types.go index eabec6f3a..2e1e545ad 100644 --- a/api/v1alpha1/warehouse_types.go +++ b/api/v1alpha1/warehouse_types.go @@ -124,7 +124,7 @@ type GitSubscription struct { // subscription is implicitly to the repository's default branch. // // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:Pattern=`^\w+([-\/]\w+)*(-\d+\.\d+)?$` + // +kubebuilder:validation:Pattern=`^\w+([-/\.]\w+)*$` Branch string `json:"branch,omitempty" protobuf:"bytes,3,opt,name=branch"` // StrictSemvers specifies whether only "strict" semver tags should be // considered. A "strict" semver tag is one containing ALL of major, minor, diff --git a/charts/kargo/resources/crds/kargo.akuity.io_warehouses.yaml b/charts/kargo/resources/crds/kargo.akuity.io_warehouses.yaml index 69c0243f8..1f949b07e 100644 --- a/charts/kargo/resources/crds/kargo.akuity.io_warehouses.yaml +++ b/charts/kargo/resources/crds/kargo.akuity.io_warehouses.yaml @@ -153,7 +153,7 @@ spec: CommitSelectionStrategy is NewestFromBranch or unspecified), the subscription is implicitly to the repository's default branch. minLength: 1 - pattern: ^\w+([-\/]\w+)*(-\d+\.\d+)?$ + pattern: ^\w+([-/\.]\w+)*$ type: string commitSelectionStrategy: default: NewestFromBranch diff --git a/ui/src/gen/schema/warehouses.kargo.akuity.io_v1alpha1.json b/ui/src/gen/schema/warehouses.kargo.akuity.io_v1alpha1.json index 8f8be8f75..0a4e461aa 100644 --- a/ui/src/gen/schema/warehouses.kargo.akuity.io_v1alpha1.json +++ b/ui/src/gen/schema/warehouses.kargo.akuity.io_v1alpha1.json @@ -81,7 +81,7 @@ "branch": { "description": "Branch references a particular branch of the repository. The value in this\nfield only has any effect when the CommitSelectionStrategy is\nNewestFromBranch or left unspecified (which is implicitly the same as\nNewestFromBranch). This field is optional. When left unspecified, (and the\nCommitSelectionStrategy is NewestFromBranch or unspecified), the\nsubscription is implicitly to the repository's default branch.", "minLength": 1, - "pattern": "^\\w+([-\\/]\\w+)*(-\\d+\\.\\d+)?$", + "pattern": "^\\w+([-/\\.]\\w+)*$", "type": "string" }, "commitSelectionStrategy": { diff --git a/ui/src/gen/v1alpha1/generated_pb.ts b/ui/src/gen/v1alpha1/generated_pb.ts index 1f0c588aa..7167d7fb4 100644 --- a/ui/src/gen/v1alpha1/generated_pb.ts +++ b/ui/src/gen/v1alpha1/generated_pb.ts @@ -1059,7 +1059,7 @@ export type GitSubscription = Message<"github.com.akuity.kargo.api.v1alpha1.GitS * subscription is implicitly to the repository's default branch. * * +kubebuilder:validation:MinLength=1 - * +kubebuilder:validation:Pattern=`^\w+([-\/]\w+)*(-\d+\.\d+)?$` + * +kubebuilder:validation:Pattern=`^\w+([-/\.]\w+)*$` * * @generated from field: optional string branch = 3; */