gitea: Release can't be created on existing tag

Description

If I create a release on an existing tag:

Releases -> Tag -> Tag name -> New release

Add title and click “Publish release” I get an error “Target branch does not exist.”

Same with API:

curl -X 'POST' \
  'https://GITEA_HOST/api/v1/repos/ORG/REPO/releases' \
  -H 'accept: application/json' \
  -H 'authorization: Basic TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "body": "text3",
  "draft": false,
  "name": "RELEASE_NAME",
  "prerelease": false,
  "tag_name": "EXISTING_TAGE",
  "target_commitish": "SHA"
}'
{"message":"Release is has no Tag","url":"https://GITEA/api/swagger"}

I expected to be able to create a release from an existing tag. Tried versions 1.17.3, 1.18.0-rc0 and dev Logs don’t show any errors.

Gitea Version

1.17.3

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

I am running Gitea as docker image (gitea/gitea). Also reproduced on https://try.gitea.io/

Database

MySQL

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

If you select the branch name here again it works in you repo: grafik

Still don’t know why that is not a problem in my clone.