Skip to content

Commit

Permalink
Merge pull request #504 from kubeshop/feat/validation-utils
Browse files Browse the repository at this point in the history
Validation utils
  • Loading branch information
monojack authored Sep 6, 2023
2 parents 78cc3e4 + ce76d66 commit 63caf9d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/mighty-seas-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@monokle/validation": minor
---

add `isPendingSuppression` utility function
4 changes: 4 additions & 0 deletions packages/validation/src/utils/getRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 63caf9d

Please sign in to comment.