@@ -14,6 +14,7 @@ import (
1414 "path"
1515 "strings"
1616
17+ asymkey_model "code.gitea.io/gitea/models/asymkey"
1718 "code.gitea.io/gitea/models/db"
1819 git_model "code.gitea.io/gitea/models/git"
1920 issues_model "code.gitea.io/gitea/models/issues"
@@ -99,7 +100,7 @@ type CommitFormOptions struct {
99100 UserCanPush bool
100101 RequireSigned bool
101102 WillSign bool
102- SigningKey * git. SigningKey
103+ SigningKeyFormDisplay string
103104 WontSignReason string
104105 CanCreatePullRequest bool
105106 CanCreateBasePullRequest bool
@@ -139,7 +140,7 @@ func PrepareCommitFormOptions(ctx *Context, doer *user_model.User, targetRepo *r
139140 protectionRequireSigned = protectedBranch .RequireSignedCommits
140141 }
141142
142- willSign , signKeyID , _ , err := asymkey_service .SignCRUDAction (ctx , targetRepo .RepoPath (), doer , targetRepo .RepoPath (), refName .String ())
143+ willSign , signKey , _ , err := asymkey_service .SignCRUDAction (ctx , targetRepo .RepoPath (), doer , targetRepo .RepoPath (), refName .String ())
143144 wontSignReason := ""
144145 if asymkey_service .IsErrWontSign (err ) {
145146 wontSignReason = string (err .(* asymkey_service.ErrWontSign ).Reason )
@@ -156,14 +157,14 @@ func PrepareCommitFormOptions(ctx *Context, doer *user_model.User, targetRepo *r
156157 canCreatePullRequest := targetRepo .UnitEnabled (ctx , unit_model .TypePullRequests ) || canCreateBasePullRequest
157158
158159 opts := & CommitFormOptions {
159- TargetRepo : targetRepo ,
160- WillSubmitToFork : submitToForkedRepo ,
161- CanCommitToBranch : canCommitToBranch ,
162- UserCanPush : canPushWithProtection ,
163- RequireSigned : protectionRequireSigned ,
164- WillSign : willSign ,
165- SigningKey : signKeyID ,
166- WontSignReason : wontSignReason ,
160+ TargetRepo : targetRepo ,
161+ WillSubmitToFork : submitToForkedRepo ,
162+ CanCommitToBranch : canCommitToBranch ,
163+ UserCanPush : canPushWithProtection ,
164+ RequireSigned : protectionRequireSigned ,
165+ WillSign : willSign ,
166+ SigningKeyFormDisplay : asymkey_model . GetDisplaySigningKey ( signKey ) ,
167+ WontSignReason : wontSignReason ,
167168
168169 CanCreatePullRequest : canCreatePullRequest ,
169170 CanCreateBasePullRequest : canCreateBasePullRequest ,
0 commit comments