mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Backport #34412 by wxiaoguang Fix #34398, fix #33308 Remove all `repo.ComposeCommentMetas` from templates, only use `repo` to render commit message. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -200,13 +200,9 @@ func ViewPost(ctx *context_module.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: "ComposeCommentMetas" (usually for comment) is not quite right, but it is still the same as what template "RenderCommitMessage" does.
|
||||
// need to be refactored together in the future
|
||||
metas := ctx.Repo.Repository.ComposeCommentMetas(ctx)
|
||||
|
||||
// the title for the "run" is from the commit message
|
||||
resp.State.Run.Title = run.Title
|
||||
resp.State.Run.TitleHTML = templates.NewRenderUtils(ctx).RenderCommitMessage(run.Title, metas)
|
||||
resp.State.Run.TitleHTML = templates.NewRenderUtils(ctx).RenderCommitMessage(run.Title, ctx.Repo.Repository)
|
||||
resp.State.Run.Link = run.Link()
|
||||
resp.State.Run.CanCancel = !run.Status.IsDone() && ctx.Repo.CanWrite(unit.TypeActions)
|
||||
resp.State.Run.CanApprove = run.NeedApproval && ctx.Repo.CanWrite(unit.TypeActions)
|
||||
|
Reference in New Issue
Block a user