Just use the body field

This commit is contained in:
Kemal Zebari 2024-08-15 18:43:39 -07:00
parent 6ec5cb77bd
commit c5d97ddcfa
3 changed files with 1 additions and 6 deletions

View File

@ -33,7 +33,6 @@ type Release struct {
type CreateReleaseOption struct {
// required: true
TagName string `json:"tag_name" binding:"Required"`
TagMessage string `json:"tag_message"`
Target string `json:"target_commitish"`
Title string `json:"name"`
Note string `json:"body"`

View File

@ -246,7 +246,7 @@ func CreateRelease(ctx *context.APIContext) {
IsTag: false,
Repo: ctx.Repo.Repository,
}
if err := release_service.CreateRelease(ctx.Repo.GitRepo, rel, nil, form.TagMessage); err != nil {
if err := release_service.CreateRelease(ctx.Repo.GitRepo, rel, nil, form.Note); err != nil {
if repo_model.IsErrReleaseAlreadyExist(err) {
ctx.Error(http.StatusConflict, "ReleaseAlreadyExist", err)
} else if models.IsErrProtectedTagName(err) {

View File

@ -20115,10 +20115,6 @@
"type": "boolean",
"x-go-name": "IsPrerelease"
},
"tag_message": {
"type": "string",
"x-go-name": "TagMessage"
},
"tag_name": {
"type": "string",
"x-go-name": "TagName"