mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-14 12:36:30 +00:00
19 lines
449 B
Go
19 lines
449 B
Go
|
package config
|
||
|
|
||
|
const severityRuleMinConditionsCount = 1
|
||
|
|
||
|
type Severity struct {
|
||
|
Default string `mapstructure:"default-severity"`
|
||
|
CaseSensitive bool `mapstructure:"case-sensitive"`
|
||
|
Rules []SeverityRule `mapstructure:"rules"`
|
||
|
}
|
||
|
|
||
|
type SeverityRule struct {
|
||
|
BaseRule `mapstructure:",squash"`
|
||
|
Severity string
|
||
|
}
|
||
|
|
||
|
func (s *SeverityRule) Validate() error {
|
||
|
return s.BaseRule.Validate(severityRuleMinConditionsCount)
|
||
|
}
|