-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Add the tag list page to the release page #12096
Conversation
Looks awesome! How about putting a trashcan symbol instead of text in brackets behind the Release version? |
This doesn't delete a tag from the git repo it just removes reference from the releases table. This means the tag still exists, you can still view it in tags list on main repo view, and still create a release from it. If releases for repo get re-synced it will show up on the releases page again too. Tags and releases are different you can't use the same code for removing a release -- release only exists in the DB but tag exists within git itself. So this doesn't fixed the linked issue and will probably mislead people into thinking a tag has been deleted when it hasn't. So I think this would have to actually delete the tag in git itself to count. If it was changed to do actually delete the tag, then I would say: Agree it should use a trash can instead of text -- Maybe another icon after TAR.GZ like this: I know it was probably to reuse the existing translation, but I think the warning should not use the phrase 'deleting a release' since we make a difference between release and tag and this is about deleting a single tag. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
ah I see I missed that 'true' but the error I see is like this:
When a repo is migrated it makes 'releases' from existing tags but sets the PublisherID to 0. I believe this is true for all tags in the release table. Then when you try to delete one of those tags it shows the error above. gitea/services/release/release.go Lines 153 to 155 in 858c35b
Lines 45 to 60 in 858c35b
Current code is only for releases that are created and assume all release have publisher information, but tags on release page do not. |
This comment has been minimized.
This comment has been minimized.
Maybe DeleteReleaseByID can check if release.IsTag and not loadAttributes then? |
I found an question is that the gitea/modules/repository/update.go Lines 56 to 110 in 858c35b
|
So if somebody wants only to remove release but not tag, how should he do? |
Yes, the current logic isn't reasonable, and we should provide the option to choose whether to delete the tag when you delete the release, but that's not the aim of this PR. |
How about a new tab named tags on the home page? And user could manage tags there. |
* Add the tags list view * Add the delete tag way on ui * Not delete tag and clear message when delete a release Signed-off-by: a1012112796 <1012112796@qq.com>
This PR has been changed. Please review it again. Thanks. |
Why not add the number of tabs after the number of commits and when you click on tags it will show a list of tags similar to the commit list? This would mean that the shown row would look like this: Or you add a selector for tag/release in the releases section - like Github does it. |
Co-authored-by: silverwind <me@silverwind.io>
Good to go? (after rebase) @lunny please re-review |
tests are failing:
|
It's not a problem, because the new item added by #13358 is a tag, which will not be shown in the release list, so the actual number is right :) gitea/models/fixtures/release.yml Lines 32 to 45 in 543697e
|
The ui is broken after merge master. @silverwind Would you please have a look , Thanks. |
Please pull in silverwind@74a04ac which fixes those and does a few more enhancements: |
Also pull in silverwind@71aa21e for some more tweaks on the title: |
Signed-off-by: a1012112796 <1012112796@qq.com>
Codecov Report
@@ Coverage Diff @@
## master #12096 +/- ##
==========================================
- Coverage 42.13% 42.11% -0.03%
==========================================
Files 691 691
Lines 75968 76002 +34
==========================================
- Hits 32010 32006 -4
- Misses 38710 38744 +34
- Partials 5248 5252 +4
Continue to review full report at Codecov.
|
@lunny need your review |
Co-authored-by: silverwind <me@silverwind.io>
🚀 |
example view: