Add tag check to release draft creation (#3729)
This commit is contained in:
parent
fb1daad13d
commit
1f877f8c87
@ -371,7 +371,7 @@ func (f *MergePullRequestForm) Validate(ctx *macaron.Context, errs binding.Error
|
|||||||
|
|
||||||
// NewReleaseForm form for creating release
|
// NewReleaseForm form for creating release
|
||||||
type NewReleaseForm struct {
|
type NewReleaseForm struct {
|
||||||
TagName string `binding:"Required"`
|
TagName string `binding:"Required;GitRefName"`
|
||||||
Target string `form:"tag_target" binding:"Required"`
|
Target string `form:"tag_target" binding:"Required"`
|
||||||
Title string `binding:"Required"`
|
Title string `binding:"Required"`
|
||||||
Content string
|
Content string
|
||||||
|
@ -19,7 +19,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
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-_\\./]")
|
GitRefNamePattern = regexp.MustCompile("[^\\d\\w-_\\./]")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user