Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release targeting wrong branch after deleting another release with the same tag but different branch #22649

Closed
KroneCorylus opened this issue Jan 29, 2023 · 4 comments · Fixed by #23171
Labels

Comments

@KroneCorylus
Copy link

KroneCorylus commented Jan 29, 2023

Description

Steps to reproduce:

  1. In a repository with at least 2 branches one with some changes (in this example: main branch, test branch) create a release 1.0.0@test (1.0.0 tag name, test branch).
  2. Delete the created release.
  3. Create a new release with the same tag but in the correct branch 1.0.0@main

Expected behaviour:
    The last release and tag should show the changes/commits made on the branch main.
Observed behaviour:
    The release show the changes made on the test branch even when the release says is targeting the main branch and shows negative commits like this:
image

More Info:
the main branch has a empty readme file
the test branch has 2 commits changing the readme file
the tag 1.0.0 show the file with the changes made on test branch
if a click on the "-2 commits" the "Compare commits" screen shows no changes.
image

Gitea Version

1.18.3 and 1.19.0 (gitea demo)

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Debian Linux and Try.gitea.io

How are you running Gitea?

The issue can be replicated both on my docker installation of giteo and in https://try.gitea.io/

Database

None

@Zettat123
Copy link
Contributor

Maybe the reason is that you didn't delete the existing tag. You could delete the 1.0.0 Tag first and then create the new release with the correct branch.

I will try to make an enhancement to optimize this process.

@KroneCorylus
Copy link
Author

KroneCorylus commented Feb 22, 2023

Maybe the reason is that you didn't delete the existing tag. You could delete the 1.0.0 Tag first and then create the new release with the correct branch.

I will try to make an enhancement to optimize this process.

Deleting the release do not delete the tag? Im going to try what you told me a report back. Thanks

@KroneCorylus
Copy link
Author

KroneCorylus commented Feb 23, 2023

Yes you are correct. If after deleting the release you manually delete the tag, the new release is created correctly. Maybe if you choose a existing tag the branch selector should be disabled ?

@Zettat123
Copy link
Contributor

Yes you are correct. If after deleting the release you manually delete the tag, the new release is created correctly. Maybe if you choose a existing tag the branch selector should be disabled ?

Yes. If a tag exists, the selector should be disabled. I will implement this function.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants