1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-08-11 17:50:58 +00:00

Use “push” event workflow(s) if defined (closes #156) (#157)

This commit is contained in:
Aidan Steele 2020-03-16 16:29:13 +11:00 committed by GitHub
parent e1ffc92e86
commit 3d2d690bb1

View file

@ -112,6 +112,8 @@ func newRunCommand(ctx context.Context, input *Input) func(*cobra.Command, []str
var eventName string
if len(args) > 0 {
eventName = args[0]
} else if plan := planner.PlanEvent("push"); plan != nil {
eventName = "push"
} else if events := planner.GetEvents(); len(events) > 0 {
// set default event type to first event
// this way user dont have to specify the event.