summaryrefslogtreecommitdiffstats
path: root/modules/templates/helper.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/templates/helper.go')
-rw-r--r--modules/templates/helper.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/templates/helper.go b/modules/templates/helper.go
index 7b997b49d9..a390d94592 100644
--- a/modules/templates/helper.go
+++ b/modules/templates/helper.go
@@ -472,6 +472,9 @@ func NewFuncMap() []template.FuncMap {
curBranch,
)
},
+ "RefShortName": func(ref string) string {
+ return git.RefName(ref).ShortName()
+ },
}}
}