mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-07 13:33:24 +09:00
enhance: improve commit page header (#39229)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user