trigger

package
v1.18.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MatchResult

type MatchResult struct {
	Trigger *model.AutomationTrigger
	Profile string
}

MatchResult holds the result of matching a CI event against automation triggers.

func Match

func Match(triggers []model.AutomationTrigger, event *model.EventContext) *MatchResult

Match finds the first trigger that matches the given event context. Returns nil if no trigger matches. First match wins.

func MatchAll added in v1.18.0

func MatchAll(triggers, bindings []model.AutomationTrigger, event *model.EventContext) *MatchResult

MatchAll searches both old-style triggers (with profile) and new-style bindings (without profile). Old-style triggers are tried first. When a new-style binding matches, MatchResult.Profile is empty.

func MatchAllByName added in v1.18.0

func MatchAllByName(triggers, bindings []model.AutomationTrigger, name string) *MatchResult

MatchAllByName searches both old-style triggers and new-style bindings by name.

func MatchByName

func MatchByName(triggers []model.AutomationTrigger, name string) *MatchResult

MatchByName finds a trigger by its declared name. Returns nil if no trigger with that name exists.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL