enhance: improve commit page header (#39229)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
silverwind
2026-09-06 11:27:04 +02:00
committed by GitHub
co-authored by wxiaoguang
parent 7c280c0ce6
commit 87d5497da0
10 changed files with 54 additions and 108 deletions
@@ -38,6 +38,8 @@ type SignCommit struct {
}
const (
VerificationReasonCommitNotSigned = "gpg.error.not_signed_commit"
// BadSignature is used as the reason when the signature has a KeyID that is in the db
// but no key that has that ID verifies the signature. This is a suspicious failure.
BadSignature = "gpg.error.probable_bad_signature"
@@ -183,3 +185,7 @@ func CalculateTrustStatus(verification *CommitVerification, repoTrustModel repo_
return err
}
func (cv *CommitVerification) IsCommitNotSigned() bool {
return !cv.Verified && cv.Reason == VerificationReasonCommitNotSigned
}