aboutsummaryrefslogtreecommitdiff
path: root/modules/form/repo.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-03-13 04:32:20 -0400
committerUnknwon <u@gogs.io>2017-03-13 04:32:20 -0400
commit1df54ea0cde038e2057d083078f952c072d0dc67 (patch)
treec5466e010f5ed8e236f5b021e669f9aa37ea0047 /modules/form/repo.go
parente6df2259abdeb75545f53a5ca4c247491b5c3d7f (diff)
release: able to add attchments to release (#1614)
Added new config section '[release.attachment]’.
Diffstat (limited to 'modules/form/repo.go')
-rw-r--r--modules/form/repo.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/form/repo.go b/modules/form/repo.go
index 826d503a..53486989 100644
--- a/modules/form/repo.go
+++ b/modules/form/repo.go
@@ -200,7 +200,7 @@ func (f *NewDiscordHook) Validate(ctx *macaron.Context, errs binding.Errors) bin
// |___/____ >____ >____/ \___ >
// \/ \/ \/
-type CreateIssue struct {
+type NewIssue struct {
Title string `binding:"Required;MaxSize(255)"`
LabelIDs string `form:"label_ids"`
MilestoneID int64
@@ -209,7 +209,7 @@ type CreateIssue struct {
Files []string
}
-func (f *CreateIssue) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
+func (f *NewIssue) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
return validate(errs, ctx.Data, f, ctx.Locale)
}
@@ -279,6 +279,7 @@ type NewRelease struct {
Content string
Draft string
Prerelease bool
+ Files []string
}
func (f *NewRelease) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
@@ -290,6 +291,7 @@ type EditRelease struct {
Content string
Draft string
Prerelease bool
+ Files []string
}
func (f *EditRelease) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {