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