Merge pull request '[BUG] Use correct template for commitmail error' (#2973) from gusted/forgejo-fix-committmail into forgejo

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2973
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
This commit is contained in:
Earl Warren 2024-04-02 14:45:54 +00:00
commit 3aad608649
2 changed files with 1 additions and 37 deletions

View file

@ -121,42 +121,6 @@ var ignoredErrorMessage = []string{
// TestRebuildCargo // TestRebuildCargo
`RebuildCargoIndex() [E] RebuildIndex failed: GetRepositoryByOwnerAndName: repository does not exist [id: 0, uid: 0, owner_name: user2, name: _cargo-index]`, `RebuildCargoIndex() [E] RebuildIndex failed: GetRepositoryByOwnerAndName: repository does not exist [id: 0, uid: 0, owner_name: user2, name: _cargo-index]`,
// TestCommitMail/Delete/Not_activated
`:HTML() [E] Render failed: failed to render template: repo/editor/edit, error: template error: builtin(static):repo/editor/edit:13:13 : executing "repo/editor/edit" at <len .TreeNames>: error calling len: reflect: call of reflect.Value.Type on zero Value
----------------------------------------------------------------------
{{$n := len .TreeNames}}
^
----------------------------------------------------------------------`,
// TestCommitMail/Delete/Not_belong_to_user
`:HTML() [E] Render failed: failed to render template: repo/editor/edit, error: template error: builtin(static):repo/editor/edit:13:13 : executing "repo/editor/edit" at <len .TreeNames>: error calling len: reflect: call of reflect.Value.Type on zero Value
----------------------------------------------------------------------
{{$n := len .TreeNames}}
^
----------------------------------------------------------------------`,
// TestCommitMail/Apply_patch/Not_activated
`:HTML() [E] Render failed: failed to render template: repo/editor/edit, error: template error: builtin(static):repo/editor/edit:13:13 : executing "repo/editor/edit" at <len .TreeNames>: error calling len: reflect: call of reflect.Value.Type on zero Value
----------------------------------------------------------------------
{{$n := len .TreeNames}}
^
----------------------------------------------------------------------`,
// TestCommitMail/Apply_patch/Not_belong_to_user
`:HTML() [E] Render failed: failed to render template: repo/editor/edit, error: template error: builtin(static):repo/editor/edit:13:13 : executing "repo/editor/edit" at <len .TreeNames>: error calling len: reflect: call of reflect.Value.Type on zero Value
----------------------------------------------------------------------
{{$n := len .TreeNames}}
^
----------------------------------------------------------------------`,
// TestCommitMail/Cherry_pick/Not_activated
`:HTML() [E] Render failed: failed to render template: repo/editor/edit, error: template error: builtin(static):repo/editor/edit:13:13 : executing "repo/editor/edit" at <len .TreeNames>: error calling len: reflect: call of reflect.Value.Type on zero Value
----------------------------------------------------------------------
{{$n := len .TreeNames}}
^
----------------------------------------------------------------------`,
// TestCommitMail/Cherry_pick/Not_belong_to_user
`:HTML() [E] Render failed: failed to render template: repo/editor/edit, error: template error: builtin(static):repo/editor/edit:13:13 : executing "repo/editor/edit" at <len .TreeNames>: error calling len: reflect: call of reflect.Value.Type on zero Value
----------------------------------------------------------------------
{{$n := len .TreeNames}}
^
----------------------------------------------------------------------`,
// TestDangerZoneConfirmation/Convert_fork/Fail // TestDangerZoneConfirmation/Convert_fork/Fail
`/gitea-repositories/user20/big_test_public_fork_7.git Error: no such file or directory`, `/gitea-repositories/user20/big_test_public_fork_7.git Error: no such file or directory`,
// TestGitSmartHTTP // TestGitSmartHTTP

View file

@ -950,7 +950,7 @@ func getGitIdentity(ctx *context.Context, commitMailID int64, tpl base.TplName,
if email == nil || !email.IsActivated { if email == nil || !email.IsActivated {
ctx.Data["Err_CommitMailID"] = true ctx.Data["Err_CommitMailID"] = true
ctx.RenderWithErr(ctx.Tr("repo.editor.invalid_commit_mail"), tplEditFile, form) ctx.RenderWithErr(ctx.Tr("repo.editor.invalid_commit_mail"), tpl, form)
return nil return nil
} }