Skip to content

Commit 57e0bf4

Browse files
author
Gusted
authored
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.
1 parent dbd3b7f commit 57e0bf4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

routers/api/v1/repo/release.go

+1
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ func CreateRelease(ctx *context.APIContext) {
224224
rel.IsTag = false
225225
rel.Repo = ctx.Repo.Repository
226226
rel.Publisher = ctx.Doer
227+
rel.Target = form.Target
227228

228229
if err = release_service.UpdateRelease(ctx.Doer, ctx.Repo.GitRepo, rel, nil, nil, nil); err != nil {
229230
ctx.Error(http.StatusInternalServerError, "UpdateRelease", err)

0 commit comments

Comments
 (0)