gitea/routers/web/repo
Kemal Zebari ecd463c2f1
Validate that the tag doesn't exist when creating a tag via the web (#33241)
Found while investigating #33210.

This line no longer makes sense because the form field "TagName" is
required, so this would mean that this code path would never be covered.
Because it isn't covered, we end up going down the "update release"
logic where we eventually set `Release.IsTag` to false (meaning it will
now be treated as a release instead of a tag).

This snapshot rewrites the condition to ensure that we aren't trying to
create a tag that already exists.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-01-14 09:27:35 +07:00
..
actions workflow_dispatch use workflow from trigger branch (#33098) 2025-01-05 21:47:18 +07:00
setting Clarify path param naming (#32969) 2024-12-24 13:47:45 +07:00
activity.go Refactor template & test related code (#32938) 2024-12-22 15:33:19 +07:00
attachment.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +07:00
blame.go Refactor context repository (#33202) 2025-01-12 03:39:46 +07:00
branch.go Refactor context repository (#33202) 2025-01-12 03:39:46 +07:00
cherry_pick.go Refactor context repository (#33202) 2025-01-12 03:39:46 +07:00
code_frequency.go Refactor template & test related code (#32938) 2024-12-22 15:33:19 +07:00
commit.go Refactor context RefName and RepoAssignment (#33226) 2025-01-13 01:07:05 +07:00
compare.go Refactor "string truncate" (#32984) 2024-12-26 11:56:03 +07:00
contributors.go Refactor template & test related code (#32938) 2024-12-22 15:33:19 +07:00
download.go Use gitrepo.GetTreePathLatestCommit to get file lastest commit instead from latest commit cache (#32987) 2024-12-30 03:30:01 +07:00
editor.go Refactor context repository (#33202) 2025-01-12 03:39:46 +07:00
editor_test.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +07:00
find.go Refactor template & test related code (#32938) 2024-12-22 15:33:19 +07:00
fork.go Refactor template & test related code (#32938) 2024-12-22 15:33:19 +07:00
githttp.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +07:00
githttp_test.go
helper.go Refactor context RefName and RepoAssignment (#33226) 2025-01-13 01:07:05 +07:00
issue.go Merge updatecommentattachment functions (#33044) 2024-12-30 18:21:57 +07:00
issue_comment.go Use `CloseIssue` and `ReopenIssue` instead of `ChangeStatus` (#32467) 2024-12-25 07:38:30 +07:00
issue_content_history.go Refactor DateUtils and merge TimeSince (#32409) 2024-11-04 11:30:00 +07:00
issue_dependency.go Refactor names (#31405) 2024-06-19 06:32:45 +07:00
issue_label.go Refactor template & test related code (#32938) 2024-12-22 15:33:19 +07:00
issue_label_test.go Refactor tests (#33021) 2024-12-29 01:05:56 +07:00
issue_list.go Use `CloseIssue` and `ReopenIssue` instead of `ChangeStatus` (#32467) 2024-12-25 07:38:30 +07:00
issue_lock.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +07:00
issue_new.go Use project's redirect url instead of composing url (#33058) 2024-12-31 19:19:53 +07:00
issue_page_meta.go Filter reviews of one pull request in memory instead of database to reduce slow response because of lacking database index (#33106) 2025-01-07 10:50:09 +07:00
issue_pin.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +07:00
issue_poster.go Move some functions from issue.go to standalone files (#32468) 2024-11-11 04:28:54 +07:00
issue_stopwatch.go Issue time estimate, meaningful time tracking (#23113) 2024-12-05 13:07:53 +07:00
issue_suggestions.go Fix suggestions for issues (#32380) 2024-10-30 20:06:36 +07:00
issue_test.go
issue_timetrack.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +07:00
issue_view.go Some small refactors (#33144) 2025-01-10 06:00:06 +07:00
issue_watch.go Refactor template & test related code (#32938) 2024-12-22 15:33:19 +07:00
main_test.go
middlewares.go Refactor context repository (#33202) 2025-01-12 03:39:46 +07:00
migrate.go Refactor template & test related code (#32938) 2024-12-22 15:33:19 +07:00
milestone.go Refactor pagination (#33037) 2024-12-30 01:57:38 +07:00
packages.go Refactor context repository (#33202) 2025-01-12 03:39:46 +07:00
patch.go Refactor context repository (#33202) 2025-01-12 03:39:46 +07:00
projects.go Use project's redirect url instead of composing url (#33058) 2024-12-31 19:19:53 +07:00
projects_test.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +07:00
pull.go Automerge supports deleting branch automatically after merging (#32343) 2025-01-10 03:51:03 +07:00
pull_review.go Refactor template & test related code (#32938) 2024-12-22 15:33:19 +07:00
pull_review_test.go Refactor older tests to use testify (#33140) 2025-01-09 09:21:47 +07:00
recent_commits.go Refactor template & test related code (#32938) 2024-12-22 15:33:19 +07:00
release.go Validate that the tag doesn't exist when creating a tag via the web (#33241) 2025-01-14 09:27:35 +07:00
release_test.go Validate that the tag doesn't exist when creating a tag via the web (#33241) 2025-01-14 09:27:35 +07:00
render.go Fix incorrect ref "blob" (#33240) 2025-01-13 16:27:11 +07:00
repo.go Refactor context RefName and RepoAssignment (#33226) 2025-01-13 01:07:05 +07:00
search.go Fix bleve fuzziness search (#33078) 2025-01-03 00:32:02 +07:00
search_test.go Improve grep search (#30843) 2024-05-03 09:13:48 +07:00
topic.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +07:00
treelist.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +07:00
view.go Refactor context repository (#33202) 2025-01-12 03:39:46 +07:00
view_file.go Refactor context RefName and RepoAssignment (#33226) 2025-01-13 01:07:05 +07:00
view_home.go Refactor context RefName and RepoAssignment (#33226) 2025-01-13 01:07:05 +07:00
view_readme.go Refactor context repository (#33202) 2025-01-12 03:39:46 +07:00
view_test.go
wiki.go Refactor pagination (#33037) 2024-12-30 01:57:38 +07:00
wiki_test.go Refactor older tests to use testify (#33140) 2025-01-09 09:21:47 +07:00