Skip to content

Commit 7a5595c

Browse files
committed
add comments for the "string" type
1 parent a3a6493 commit 7a5595c

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

services/forms/repo_form.go

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -647,12 +647,16 @@ type UpdateAllowEditsForm struct {
647647

648648
// NewReleaseForm form for creating release
649649
type NewReleaseForm struct {
650-
TagName string `binding:"Required;GitRefName;MaxSize(255)"`
651-
Target string `form:"tag_target" binding:"Required;MaxSize(255)"`
652-
Title string `binding:"MaxSize(255)"`
653-
Content string
654-
Draft string
655-
TagOnly string
650+
TagName string `binding:"Required;GitRefName;MaxSize(255)"`
651+
Target string `form:"tag_target" binding:"Required;MaxSize(255)"`
652+
Title string `binding:"MaxSize(255)"`
653+
Content string
654+
Draft string
655+
656+
// TODO: ideally it should be a bool. The "string" type here was used to accept the value of `<input type="submit" value="Tag Only">`.
657+
// As now, the tmpl code had been refactor to `<button value="1">Tag Only</button>`, so the type could be safely refactored to "bool" in the future.
658+
TagOnly string
659+
656660
Prerelease bool
657661
AddTagMsg bool
658662
Files []string

0 commit comments

Comments
 (0)