Skip to content

Commit

Permalink
Add tag check to release draft creation (go-gitea#3729)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bwko authored and lafriks committed Jun 4, 2018
1 parent fb1daad commit 1f877f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/auth/repo_form.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,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
Expand Down
2 changes: 1 addition & 1 deletion modules/validation/binding.go
Original file line number Diff line number Diff line change
Expand Up @@ -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-_\\./]")
)

Expand Down

0 comments on commit 1f877f8

Please sign in to comment.