From 1df54ea0cde038e2057d083078f952c072d0dc67 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Mon, 13 Mar 2017 04:32:20 -0400 Subject: release: able to add attchments to release (#1614) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added new config section '[release.attachment]’. --- modules/form/repo.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules/form/repo.go') 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 { -- cgit v1.2.3