Support using label names for personal repos via API #14696

Open
opened 2025-11-02 11:20:23 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @chxseh on GitHub (Jul 3, 2025).

Description

Similar to #30917, and #32891, the Labels API for a user repo (/repos/owner/repoName/labels/) does not let you use the name of the label (instead requiring the ID) to create/delete/update.

Ideally this would be fixed so things like label-sync can work on Gitea.

{
    "message": "The target couldn't be found.",
    "statusCode": 404,
    "body": {
        "errors": null,
        "message": "The target couldn't be found.",
        "url": "https://git.domain.com/api/swagger"
    },
    "method": "PATCH",
    "endpoint": "/repos/repoOwner/repoName/labels/bug"
}

Gitea Version

1.24.2

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Docker Compose

Database

MySQL/MariaDB

Originally created by @chxseh on GitHub (Jul 3, 2025). ### Description Similar to #30917, and #32891, the Labels API for a user repo (`/repos/owner/repoName/labels/`) does not let you use the name of the label (instead requiring the ID) to create/delete/update. Ideally this would be fixed so things like [label-sync](https://github.com/marketplace/actions/label-sync) can work on Gitea. ```cs { "message": "The target couldn't be found.", "statusCode": 404, "body": { "errors": null, "message": "The target couldn't be found.", "url": "https://git.domain.com/api/swagger" }, "method": "PATCH", "endpoint": "/repos/repoOwner/repoName/labels/bug" } ``` ### Gitea Version 1.24.2 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? Docker Compose ### Database MySQL/MariaDB
GiteaMirror added the topic/apitype/bug labels 2025-11-02 11:20:23 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14696