API response for label returns empty 'url' field #3868

Closed
opened 2025-11-02 05:28:58 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @bobemoe on GitHub (Aug 29, 2019).

  • Gitea version (or commit ref): 1.10.0+dev-230-g187ae109d
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant

Description

When fetching or creating a label, the url field in the json response is blank:

https://try.gitea.io/api/v1/repos/bobemoe/test/issues/1/labels

[
  {
    "id": 4150,
    "name": "bug",
    "color": "ee0701",
    "description": "Something is not working",
    "url": ""
  }
]

Expected that it will return the API url for editing the label, same as it does for an issue:

https://try.gitea.io/api/v1/repos/bobemoe/test/issues/1

{
  "id": 5668,
  "url": "https://try.gitea.io/api/v1/repos/bobemoe/test/issues/1",
  "number": 1,
  "user": {
    "id": 16866,
    "login": "bobemoe",
...
Originally created by @bobemoe on GitHub (Aug 29, 2019). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.10.0+dev-230-g187ae109d - Can you reproduce the bug at https://try.gitea.io: - [x] Yes (provide example URL) - [ ] No - [ ] Not relevant ## Description When fetching or creating a label, the url field in the json response is blank: https://try.gitea.io/api/v1/repos/bobemoe/test/issues/1/labels ```json [ { "id": 4150, "name": "bug", "color": "ee0701", "description": "Something is not working", "url": "" } ] ``` Expected that it will return the API url for editing the label, same as it does for an issue: https://try.gitea.io/api/v1/repos/bobemoe/test/issues/1 ```json { "id": 5668, "url": "https://try.gitea.io/api/v1/repos/bobemoe/test/issues/1", "number": 1, "user": { "id": 16866, "login": "bobemoe", ... ``` <!-- **If this issue involves the Web Interface, please include a screenshot** -->
GiteaMirror added the issue/confirmedtype/bugmodifies/api labels 2025-11-02 05:28:58 -06:00
Author
Owner

@shashvat-kedia commented on GitHub (Oct 10, 2019):

@lunny Can I work on this?

@shashvat-kedia commented on GitHub (Oct 10, 2019): @lunny Can I work on this?
Author
Owner

@techknowlogick commented on GitHub (Oct 10, 2019):

@sd1998 sure

@techknowlogick commented on GitHub (Oct 10, 2019): @sd1998 sure
Author
Owner

@stale[bot] commented on GitHub (Dec 9, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Dec 9, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3868