Skip to content

Commit eb0d488

Browse files
committed
Show negative results in Signed-Tags details
Negative results logged with a "!!" prefix. Updates #95 $ go run . --repo=github.com/cilium/cilium --show-details --checks=Signed-Tags Starting [Signed-Tags] Finished [Signed-Tags] RESULTS ------- Signed-Tags: Fail 4 verified tag found: v1.9.0-rc1, commit: a46b5c308779b00676bcbffe6847701984fb7ec7 !! unverified tag found: v1.9.0-rc2, commit: 2ee8e4659ad4050154eb83008ba6434bddad44eb, reason: unsigned verified tag found: v1.9.0-rc3, commit: ee77e846a9b85e318d6d077c801e2615d5e7dbe3 !! unverified tag found: v1.9.0, commit: 1cdd547dce26adb046d117494d559c64007365fd, reason: unsigned verified tag found: v1.9.1, commit: bb4abe1720cb56c6a5f74d0567665555ad8434f1 found 3 of 5 verified tags
1 parent 4ec34e9 commit eb0d488

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

checks/signed_tags.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ func init() {
2626
}
2727

2828
func SignedTags(c checker.Checker) checker.CheckResult {
29-
3029
type ref struct {
3130
Name githubv4.String
3231
Target struct {
@@ -61,10 +60,18 @@ func SignedTags(c checker.Checker) checker.CheckResult {
6160
return checker.RetryResult(err)
6261
}
6362
if gt.GetVerification().GetVerified() {
64-
c.Logf("signed tag found: %s, commit: %s", t.Name, sha)
63+
c.Logf("verified tag found: %s, commit: %s", t.Name, sha)
6564
totalSigned++
65+
} else {
66+
c.Logf("!! unverified tag found: %s, commit: %s, reason: %s", t.Name, sha, gt.GetVerification().GetReason())
6667
}
6768
}
6869

70+
if totalReleases == 0 {
71+
c.Logf("no releases found")
72+
return checker.InconclusiveResult
73+
}
74+
75+
c.Logf("found %d of %d verified tags", totalSigned, totalReleases)
6976
return checker.ProportionalResult(totalSigned, totalReleases, 0.8)
7077
}

0 commit comments

Comments
 (0)