Documentation
¶
Index ¶
- type MatchResult
- func Match(triggers []model.AutomationTrigger, event *model.EventContext) *MatchResult
- func MatchAll(triggers, bindings []model.AutomationTrigger, event *model.EventContext) *MatchResult
- func MatchAllByName(triggers, bindings []model.AutomationTrigger, name string) *MatchResult
- func MatchByName(triggers []model.AutomationTrigger, name string) *MatchResult
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.
Click to show internal directories.
Click to hide internal directories.