From 8109da9da7918e508cabac047aef4fc7a47a830a Mon Sep 17 00:00:00 2001 From: yuzhipeng Date: Thu, 6 Jul 2023 15:31:28 +0800 Subject: [PATCH] Add new const represent pullrequest title and true false Add pullrequest title const and true false Signed-off-by: yuzhipeng --- apis/meta/v1alpha1/cloudevent.go | 27 ++++++++++++------------ apis/meta/v1alpha1/labels_annotations.go | 7 ++++++ 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/apis/meta/v1alpha1/cloudevent.go b/apis/meta/v1alpha1/cloudevent.go index 07b742d4..fe266b45 100644 --- a/apis/meta/v1alpha1/cloudevent.go +++ b/apis/meta/v1alpha1/cloudevent.go @@ -100,19 +100,20 @@ func (evt *CloudEvent) GetValWithKey(ctx context.Context, path *field.Path) (val } const ( - CloudEventPrefix = "dev.katanomi.cloudevents" - CloudEventExtGitReference = "reference" - CloudEventExtGitBranch = "branch" - CloudEventExtGitCommitMessage = "commitmessage" - CloudEventExtGitCommitID = "commit" - CloudEventExtGitSourceBranch = "sourcebranch" - CloudEventExtGitTargetBranch = "targetbranch" - CloudEventExtGitTag = "tag" - CloudEventExtAction = "action" - CloudEventExtSender = "sender" - CloudEventExtPullRequestNumber = "number" - CloudEventExtCodeRepository = "repository" - CloudEventExtWebhookType = "webhooktype" + CloudEventPrefix = "dev.katanomi.cloudevents" + CloudEventExtGitReference = "reference" + CloudEventExtGitBranch = "branch" + CloudEventExtGitCommitMessage = "commitmessage" + CloudEventExtGitPullRequestTitle = "pullrequesttitle" + CloudEventExtGitCommitID = "commit" + CloudEventExtGitSourceBranch = "sourcebranch" + CloudEventExtGitTargetBranch = "targetbranch" + CloudEventExtGitTag = "tag" + CloudEventExtAction = "action" + CloudEventExtSender = "sender" + CloudEventExtPullRequestNumber = "number" + CloudEventExtCodeRepository = "repository" + CloudEventExtWebhookType = "webhooktype" // CloudEventExtRevisionSubmitter indicates email of revision submitter CloudEventExtRevisionSubmitter = "revisionsubmitter" diff --git a/apis/meta/v1alpha1/labels_annotations.go b/apis/meta/v1alpha1/labels_annotations.go index 7dd61174..4d5b1fe5 100644 --- a/apis/meta/v1alpha1/labels_annotations.go +++ b/apis/meta/v1alpha1/labels_annotations.go @@ -170,3 +170,10 @@ const ( // UserOwnedAnnotationKey annotated the resource's owner is one user UserOwnedAnnotationKey = "katanomi.dev/owned.username" // NOSONAR // ignore: "Key" detected here, make sure this is not a hard-coded credential ) + +const ( + // TrueValue represent string true + TrueValue = "true" + // FalseValue represent string false + FalseValue = "false" +)