Skip to content

Commit

Permalink
Add MD5 back to template helper functions to avoid breaking (#21102)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
wxiaoguang authored Sep 7, 2022
1 parent 32eef4a commit 31842f1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/templates/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 31842f1

Please sign in to comment.