Skip to content

Commit

Permalink
Fixes based on review.
Browse files Browse the repository at this point in the history
Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
  • Loading branch information
naveensrinivasan committed Dec 28, 2023
1 parent ceea58e commit 31f0b1b
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions checks/evaluation/signed_releases.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,22 @@ func SignedReleases(name string,
f := &findings[i]

// Debug release name
if f.Outcome == finding.OutcomeNotApplicable {
dl.Warn(&checker.LogMessage{
Text: "no releases found",
})
// Generic summary.
return checker.CreateInconclusiveResult(name, "no releases found")
}
releaseName := getReleaseName(f)
if releaseName == "" {
dl.Warn(&checker.LogMessage{
Text: "no GitHub releases found",
Text: "no releases found",
})
// Generic summary.
return checker.CreateInconclusiveResult(name, "no releases found")

Check warning on line 63 in checks/evaluation/signed_releases.go

View check run for this annotation

Codecov / codecov/patch

checks/evaluation/signed_releases.go#L59-L63

Added lines #L59 - L63 were not covered by tests
}

if !contains(loggedReleases, releaseName) {
dl.Debug(&checker.LogMessage{
Text: fmt.Sprintf("GitHub release found: %s", releaseName),
Expand All @@ -63,13 +71,6 @@ func SignedReleases(name string,
}

// Check if outcome is NotApplicable
if f.Outcome == finding.OutcomeNotApplicable {
dl.Warn(&checker.LogMessage{
Text: "no GitHub releases found",
})
// Generic summary.
return checker.CreateInconclusiveResult(name, "no releases found")
}
}

totalPositive := 0
Expand Down

0 comments on commit 31f0b1b

Please sign in to comment.