mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-13 03:56:39 +00:00
c28f7cb29f
Initial part of #435
18 lines
449 B
Go
18 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)
|
|
}
|