Add tag check to release draft creation

This commit is contained in:
Bwko 2018-03-27 22:19:41 +02:00
parent 4c6e170ceb
commit 243bf0dba0
No known key found for this signature in database
GPG Key ID: 432CCC0818CB741D
2 changed files with 2 additions and 2 deletions

View File

@ -365,7 +365,7 @@ func (f *MergePullRequestForm) Validate(ctx *macaron.Context, errs binding.Error
// NewReleaseForm form for creating release
type NewReleaseForm struct {
TagName string `binding:"Required"`
TagName string `binding:"Required;GitRefName"`
Target string `form:"tag_target" binding:"Required"`
Title string `binding:"Required"`
Content string

View File

@ -19,7 +19,7 @@ const (
)
var (
// GitRefNamePattern is regular expression wirh unallowed characters in git reference name
// GitRefNamePattern is regular expression with unallowed characters in git reference name
GitRefNamePattern = regexp.MustCompile("[^\\d\\w-_\\./]")
)