Skip to content

Commit

Permalink
chore: remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
plyr4 committed Apr 5, 2024
1 parent dd976c1 commit edccc74
Showing 1 changed file with 0 additions and 41 deletions.
41 changes: 0 additions & 41 deletions action/secret/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (

"github.com/go-vela/types/constants"
"github.com/go-vela/types/library"
"github.com/go-vela/types/library/actions"

"github.com/sirupsen/logrus"
)
Expand Down Expand Up @@ -92,43 +91,3 @@ func (c *Config) Validate() error {

return nil
}

// returns a useable list of valid events using a combination of hardcoded shorthand names and AllowEvents.List().
func validEvents() []string {
unlistedEvents := []string{
"pull_request",
"push:branch",
"push:tag",
"deployment:created",
"schedule:run",
}

t := true

evs := library.Events{
Push: &actions.Push{
Branch: &t,
Tag: &t,
DeleteBranch: &t,
DeleteTag: &t,
},
PullRequest: &actions.Pull{
Opened: &t,
Edited: &t,
Synchronize: &t,
Reopened: &t,
},
Deployment: &actions.Deploy{
Created: &t,
},
Comment: &actions.Comment{
Created: &t,
Edited: &t,
},
Schedule: &actions.Schedule{
Run: &t,
},
}

return append(evs.List(), unlistedEvents...)
}

0 comments on commit edccc74

Please sign in to comment.