From bbdedda826ca4ce14906c428be88e04819d799ae Mon Sep 17 00:00:00 2001 From: ecrupper Date: Wed, 6 Sep 2023 10:03:23 -0500 Subject: [PATCH] patch(v0.20.2/secrets): support schedule event for secrets --- action/secret/validate.go | 2 ++ action/secret/validate_test.go | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/action/secret/validate.go b/action/secret/validate.go index cf9abbec..206bfebe 100644 --- a/action/secret/validate.go +++ b/action/secret/validate.go @@ -96,6 +96,8 @@ func (c *Config) Validate() error { fallthrough case constants.EventPush: fallthrough + case constants.EventSchedule: + fallthrough case constants.EventTag: continue default: diff --git a/action/secret/validate_test.go b/action/secret/validate_test.go index f39562eb..3179ce64 100644 --- a/action/secret/validate_test.go +++ b/action/secret/validate_test.go @@ -93,6 +93,20 @@ func TestSecret_Config_Validate(t *testing.T) { Output: "", }, }, + { + failure: false, + config: &Config{ + Action: "add", + Engine: "native", + Type: "repo", + Org: "github", + Repo: "octocat", + Name: "foo", + Value: "bar", + Events: []string{"comment", "push", "pull_request", "tag", "deployment", "schedule"}, + Output: "", + }, + }, { failure: true, config: &Config{