forked from forgejo/forgejo
Title can be empty when creating tag only (#23917)
Fixes #23809 Make the title not required. If the title is empty when creating release (not tag), an error message will be displayed. 
This commit is contained in:
parent
950c93a66a
commit
ed7245f997
4 changed files with 9 additions and 2 deletions
|
@ -360,6 +360,12 @@ func NewReleasePost(ctx *context.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
// Title of release cannot be empty
|
||||
if len(form.TagOnly) == 0 && len(form.Title) == 0 {
|
||||
ctx.RenderWithErr(ctx.Tr("repo.release.title_empty"), tplReleaseNew, &form)
|
||||
return
|
||||
}
|
||||
|
||||
var attachmentUUIDs []string
|
||||
if setting.Attachment.Enabled {
|
||||
attachmentUUIDs = form.Files
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue