From bcde557666141904a4c5f9aa04115758bf94f462 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Mon, 16 Sep 2024 14:45:27 +0200 Subject: [PATCH] Add comment for custom triggers parsing --- models/selective_triggers.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/models/selective_triggers.go b/models/selective_triggers.go index d5364b74..b94915e0 100644 --- a/models/selective_triggers.go +++ b/models/selective_triggers.go @@ -38,6 +38,8 @@ type TagGitEventTriggerItem struct { Name any `json:"name,omitempty" yaml:"name,omitempty"` } +// UnmarshalYAML implements the yaml.Unmarshaler interface for Triggers, allowing +// additional validation of the triggers YAML configuration. func (triggers *Triggers) UnmarshalYAML(unmarshal func(interface{}) error) error { var triggersConfig map[string]any if err := unmarshal(&triggersConfig); err != nil {