Skip to content

Commit

Permalink
Add comment for custom triggers parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
godrei committed Sep 16, 2024
1 parent bbc67c9 commit bcde557
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions models/selective_triggers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit bcde557

Please sign in to comment.