Skip to content

Commit

Permalink
fix(secrets): allow schedule events for secrets (#475)
Browse files Browse the repository at this point in the history
  • Loading branch information
ecrupper authored Sep 5, 2023
1 parent 9d2d7b6 commit 010e316
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions action/secret/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ func (c *Config) Validate() error {
fallthrough
case constants.EventPush:
fallthrough
case constants.EventSchedule:
fallthrough
case constants.EventTag:
continue
default:
Expand Down
14 changes: 14 additions & 0 deletions action/secret/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit 010e316

Please sign in to comment.