Add the !filter and !warn imperative labels (#580)

This commit is contained in:
Paul Frazee 2023-05-04 00:55:33 -05:00 committed by GitHub
parent 33bf9c3869
commit ab3074fdee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 99 additions and 3 deletions

View file

@ -8,6 +8,8 @@ import {
import {
CONFIGURABLE_LABEL_GROUPS,
ILLEGAL_LABEL_GROUP,
ALWAYS_FILTER_LABEL_GROUP,
ALWAYS_WARN_LABEL_GROUP,
UNKNOWN_LABEL_GROUP,
} from './const'
import {
@ -34,6 +36,12 @@ export function getLabelValueGroup(labelVal: string): LabelValGroup {
if (ILLEGAL_LABEL_GROUP.values.includes(labelVal)) {
return ILLEGAL_LABEL_GROUP
}
if (ALWAYS_FILTER_LABEL_GROUP.values.includes(labelVal)) {
return ALWAYS_FILTER_LABEL_GROUP
}
if (ALWAYS_WARN_LABEL_GROUP.values.includes(labelVal)) {
return ALWAYS_WARN_LABEL_GROUP
}
if (CONFIGURABLE_LABEL_GROUPS[id].values.includes(labelVal)) {
return CONFIGURABLE_LABEL_GROUPS[id]
}