You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/services
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>
1 month ago
..
actions Refactor RefName (#33234) 1 month ago
agit Add reviewers selection to new pull request (#32403) 4 months ago
asymkey Move delete deploy keys into service layer (#32201) 2 months ago
attachment Include file extension checks in attachment API (#32151) 4 months ago
auth Refactor older tests to use testify (#33140) 2 months ago
automerge Automerge supports deleting branch automatically after merging (#32343) 2 months ago
context Fix incorrect ref "blob" (#33240) 1 month ago
contexttest Refactor request context (#32956) 2 months ago
convert Fix typo in gitea downloader test and add missing codebase in `ToGitServiceType` (#33146) 2 months ago
cron Enable tenv and testifylint rules (#32852) 2 months ago
doctor Refactor older tests to use testify (#33140) 2 months ago
externalaccount allow synchronizing user status from OAuth2 login providers (#31572) 7 months ago
feed Refactor RefName (#33234) 1 month ago
forms Validate that the tag doesn't exist when creating a tag via the web (#33241) 1 month ago
gitdiff Refactor older tests to use testify (#33140) 2 months ago
indexer Update issue indexer after merging a PR (#30715) 10 months ago
issue Refactor RefName (#33234) 1 month ago
lfs Fix LFS route mock, realm, middleware names (#32488) 3 months ago
mailer Refactor older tests to use testify (#33140) 2 months ago
markup Refactor request context (#32956) 2 months ago
migrations Refactor older tests to use testify (#33140) 2 months ago
mirror Fix mirror bug (#33224) 1 month ago
notify Add new event commit status creation and webhook implementation (#27151) 4 months ago
oauth2_provider Introduce OrgList and add LoadTeams, optimaze Load teams for orgs (#32543) 3 months ago
org Refactor tests (#33021) 2 months ago
packages Refactor package (routes and error handling, npm peer dependency) (#33111) 2 months ago
projects Add issue comment when moving issues from one column to another of the project (#29311) 7 months ago
pull Automerge supports deleting branch automatically after merging (#32343) 2 months ago
release Refactor "string truncate" (#32984) 2 months ago
repository Refactor context RefName and RepoAssignment (#33226) 1 month ago
secrets Refactor deletion (#28610) 1 year ago
task Fix "force private" logic (#31012) 9 months ago
uinotification Penultimate round of `db.DefaultContext` refactor (#27414) 1 year ago
user Move some errors to their own sub packages (#32880) 2 months ago
webhook Refactor RefName (#33234) 1 month ago
webtheme Initial support for colorblindness-friendly themes (#30625) 10 months ago
wiki Refactor older tests to use testify (#33140) 2 months ago