diff options
Diffstat (limited to 'modules/context/repo.go')
-rw-r--r-- | modules/context/repo.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/context/repo.go b/modules/context/repo.go index c363c36994..1a83c49e95 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -1089,6 +1089,9 @@ func (ctx *Context) IssueTemplatesErrorsFromDefaultBranch() ([]*api.IssueTemplat if it, err := template.UnmarshalFromEntry(entry, dirName); err != nil { invalidFiles[fullName] = err } else { + if !strings.HasPrefix(it.Ref, "refs/") { // Assume that the ref intended is always a branch - for tags users should use refs/tags/<ref> + it.Ref = git.BranchPrefix + it.Ref + } issueTemplates = append(issueTemplates, it) } } |