mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-03-16 17:54:07 +01:00
Add cron feature (#934)
https://woodpecker-ci.org/docs/usage/cron Co-authored-by: Anbraten <anton@ju60.de> Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
This commit is contained in:
@@ -21,11 +21,12 @@ const (
|
||||
EventPull WebhookEvent = "pull_request"
|
||||
EventTag WebhookEvent = "tag"
|
||||
EventDeploy WebhookEvent = "deployment"
|
||||
EventCron WebhookEvent = "cron"
|
||||
)
|
||||
|
||||
func ValidateWebhookEvent(s WebhookEvent) bool {
|
||||
switch s {
|
||||
case EventPush, EventPull, EventTag, EventDeploy:
|
||||
case EventPush, EventPull, EventTag, EventDeploy, EventCron:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user