From 31842f12a4bb22554857f36d1b78b15decd73419 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Wed, 7 Sep 2022 19:30:52 +0800 Subject: [PATCH] Add MD5 back to template helper functions to avoid breaking (#21102) In #20932 the MD5 helper function was removed from template context, it breaks user's customized templates. This PR adds the MD5 helper function back. --- modules/templates/helper.go | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/templates/helper.go b/modules/templates/helper.go index e78dcb61cf..2ea7bdacc6 100644 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -154,6 +154,7 @@ func NewFuncMap() []template.FuncMap { "DiffTypeToStr": DiffTypeToStr, "DiffLineTypeToStr": DiffLineTypeToStr, "ShortSha": base.ShortSha, + "MD5": base.EncodeMD5, "ActionContent2Commits": ActionContent2Commits, "PathEscape": url.PathEscape, "PathEscapeSegments": util.PathEscapeSegments,