mirror of
https://github.com/go-gitea/gitea
synced 2024-11-14 01:35:54 +01:00
Set target on create release with existing tag (#20381)
When you create a new release(e.g. via Tea) and specify a tag that already exists on the repository, Gitea will instead use the `UpdateRelease` functionality. However it currently doesn't set the Target field. This PR fixes that.
This commit is contained in:
parent
dbd3b7f9fd
commit
57e0bf43eb
@ -224,6 +224,7 @@ func CreateRelease(ctx *context.APIContext) {
|
|||||||
rel.IsTag = false
|
rel.IsTag = false
|
||||||
rel.Repo = ctx.Repo.Repository
|
rel.Repo = ctx.Repo.Repository
|
||||||
rel.Publisher = ctx.Doer
|
rel.Publisher = ctx.Doer
|
||||||
|
rel.Target = form.Target
|
||||||
|
|
||||||
if err = release_service.UpdateRelease(ctx.Doer, ctx.Repo.GitRepo, rel, nil, nil, nil); err != nil {
|
if err = release_service.UpdateRelease(ctx.Doer, ctx.Repo.GitRepo, rel, nil, nil, nil); err != nil {
|
||||||
ctx.Error(http.StatusInternalServerError, "UpdateRelease", err)
|
ctx.Error(http.StatusInternalServerError, "UpdateRelease", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user