diff options
author | Gusted <williamzijl7@hotmail.com> | 2022-07-15 18:39:48 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-15 20:39:48 +0200 |
commit | 95a27eb662ae1ecf837ad6a89e2254a9e02d18ff (patch) | |
tree | 1c0edd64a1b632ef3994b0fb96d9960ea0276460 /routers/api | |
parent | c91b8c808974491759429da4b07d1cc87fc2ff86 (diff) | |
download | gitea-95a27eb662ae1ecf837ad6a89e2254a9e02d18ff.tar.gz gitea-95a27eb662ae1ecf837ad6a89e2254a9e02d18ff.zip |
Set target on create release with existing tag (#20381) (#20382)
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.
Diffstat (limited to 'routers/api')
-rw-r--r-- | routers/api/v1/repo/release.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/routers/api/v1/repo/release.go b/routers/api/v1/repo/release.go index 8dfe7e06d2..80009f78e9 100644 --- a/routers/api/v1/repo/release.go +++ b/routers/api/v1/repo/release.go @@ -224,6 +224,7 @@ func CreateRelease(ctx *context.APIContext) { rel.IsTag = false rel.Repo = ctx.Repo.Repository rel.Publisher = ctx.Doer + rel.Target = form.Target if err = release_service.UpdateRelease(ctx.Doer, ctx.Repo.GitRepo, rel, nil, nil, nil); err != nil { ctx.Error(http.StatusInternalServerError, "UpdateRelease", err) |