diff --git a/.changeset/mighty-seas-try.md b/.changeset/mighty-seas-try.md new file mode 100644 index 000000000..d046ad11f --- /dev/null +++ b/.changeset/mighty-seas-try.md @@ -0,0 +1,5 @@ +--- +"@monokle/validation": minor +--- + +add `isPendingSuppression` utility function diff --git a/packages/validation/src/utils/getRule.ts b/packages/validation/src/utils/getRule.ts index 94cf89038..35e090ca3 100644 --- a/packages/validation/src/utils/getRule.ts +++ b/packages/validation/src/utils/getRule.ts @@ -28,6 +28,10 @@ export function isSuppressed(result: ValidationResult): boolean { return result.suppressions?.some(s => s.status === 'accepted') ?? false; } +export function isPendingSuppression(result: ValidationResult): boolean { + return result.suppressions?.some(s => s.status === 'underReview') ?? false; +} + export function getRuleForResultV2(run: ValidationRun | undefined, result: ValidationResult): RuleMetadata { const plugin = getPluginForResult(run, result); const ruleIndex = result.rule.index;