enhance: improve commit page header (#39229)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
silverwindandwxiaoguang authored and GitHub committed 2026-09-06 11:27:04 +02:00
1 parent 7c280c0ce6
commit 87d5497da0
10 files changed
+54 -108

No files matched your search

+1 -1
View File
@@ -46,7 +46,7 @@ func ParseCommitWithSignatureCommitter(ctx context.Context, c *git.Commit, commi
return &asymkey_model.CommitVerification{
CommittingUser: committer,
Verified: false,
Reason: "gpg.error.not_signed_commit",
Reason: asymkey_model.VerificationReasonCommitNotSigned,
}
}
// to support instance key, we need a fake committer user (not really needed, but legacy code accesses the committer without nil-check)
+2 -1
View File
@@ -6,6 +6,7 @@ package files
import (
"context"
"gitea.dev/models/asymkey"
"gitea.dev/modules/git"
"gitea.dev/modules/structs"
asymkey_service "gitea.dev/services/asymkey"
@@ -28,7 +29,7 @@ func GetPayloadCommitVerification(ctx context.Context, commit *git.Commit) *stru
verification.Verified = commitVerification.Verified
verification.Reason = commitVerification.Reason
if verification.Reason == "" && !verification.Verified {
verification.Reason = "gpg.error.not_signed_commit"
verification.Reason = asymkey.VerificationReasonCommitNotSigned
}
return verification
}