1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-10-10 19:32:04 +00:00

pin to v1.0.0 of github action parser

This commit is contained in:
Casey Lee 2019-02-06 22:36:08 -08:00
parent 9c3a288946
commit eb25b2a615
116 changed files with 9431 additions and 3576 deletions

View file

@ -0,0 +1,42 @@
package parser
import (
"strings"
)
// isAllowedEventType returns true if the event type is supported.
func isAllowedEventType(eventType string) bool {
_, ok := eventTypeWhitelist[strings.ToLower(eventType)]
return ok
}
// https://developer.github.com/actions/creating-workflows/workflow-configuration-options/#events-supported-in-workflow-files
var eventTypeWhitelist = map[string]struct{}{
"check_run": {},
"check_suite": {},
"commit_comment": {},
"create": {},
"delete": {},
"deployment": {},
"deployment_status": {},
"fork": {},
"gollum": {},
"issue_comment": {},
"issues": {},
"label": {},
"member": {},
"milestone": {},
"page_build": {},
"project_card": {},
"project_column": {},
"project": {},
"public": {},
"pull_request_review_comment": {},
"pull_request_review": {},
"pull_request": {},
"push": {},
"release": {},
"repository_dispatch": {},
"status": {},
"watch": {},
}