Files
Gitea/models
cbb563b080 fix(api): edit and delete repository labels by name (#39974)
Repo and org label endpoints accepted a label name for GET but only a
numeric ID for PATCH and DELETE, which breaks label-sync style tools.

- PATCH and DELETE on `/repos/{owner}/{repo}/labels/{id}` and
`/orgs/{org}/labels/{id}` accept a label name when the value is not
numeric, numeric values stay IDs
- A name shared by several labels returns 400 instead of acting on an
arbitrary one
- Deleting a missing label returns 404 instead of 204
- The swagger `id` parameter of these endpoints is now a string

Fixes: https://github.com/go-gitea/gitea/issues/34937
Co-authored-by: Hello-Liar <80651389+Hello-Liar@users.noreply.github.com>
Co-authored-by: silverwind <me@silverwind.io>
2026-10-30 19:48:56 +00:00
..
2026-10-24 13:48:19 +00:00
2026-10-26 11:22:44 +00:00
2026-10-24 13:48:19 +00:00
2026-10-24 13:48:19 +00:00
2026-10-24 13:48:19 +00:00
2026-10-24 13:48:19 +00:00
2026-09-26 17:38:42 +00:00
2026-10-24 13:48:19 +00:00