API returns issues filtered by label, when the label is empty #304

Closed
opened 2025-11-28 14:37:40 +00:00 by zlopez · 3 comments

I enabled forge.fedoraproject.org in jira_sync today and found out that https://forge.fedoraproject.org/api/v1/repos/cle/requests-test/issues?labels=cle&limit=50 is returning issues that have labels: [].

I assume this is caused by namespace being same as the label to filter the issues by.

I enabled forge.fedoraproject.org in [jira_sync](https://github.com/Zlopez/jira_sync) today and found out that https://forge.fedoraproject.org/api/v1/repos/cle/requests-test/issues?labels=cle&limit=50 is returning issues that have `labels: []`. I assume this is caused by namespace being same as the label to filter the issues by.
ryanlerch added this to the Backlog project 2026-01-12 10:15:19 +00:00
t0xic0der modified the project from Backlog to Sprint 17 2026-03-23 10:27:49 +00:00
Member

@zlopez, I have initialised a repository of the same name, requests-test and have created four issue tickets in total there. Two of those issue tickets (i.e. cle/requests-test#2 and cle/requests-test#4) have the label cle assigned to them, while the other two of those tickets (i.e. cle/requests-test#1 and cle/requests-test#3) do not. When making the same API request from before, I see the following content.

[
  {
    "id": 109888,
    "url": "https://forge.fedoraproject.org/api/v1/repos/cle/requests-test/issues/4",
    "html_url": "https://forge.fedoraproject.org/cle/requests-test/issues/4",
    "number": 4,
    "user": {
      "id": 37,
      "login": "t0xic0der",
      "login_name": "",
      "source_id": 0,
      "full_name": "Akashdeep Dhar",
      "email": "t0xic0der@noreply.forge.fedoraproject.org",
      "avatar_url": "https://forge.fedoraproject.org/avatars/a153d9164ece803b914d3c91c6e72bbd01289e728be545e8ada9b11d0834a189",
      "html_url": "https://forge.fedoraproject.org/t0xic0der",
      "language": "",
      "is_admin": false,
      "last_login": "0001-01-01T00:00:00Z",
      "created": "2025-08-13T10:50:08Z",
      "restricted": false,
      "active": false,
      "prohibit_login": false,
      "location": "Pune, India",
      "pronouns": "he/him/his",
      "website": "https://gridhead.net/",
      "description": "আকাশদীপ ধর (gridhead@fedorable) is a senior software engineer in the Red Hat Community Linux Engineering team, working on researching and developing applications running on Fedora Infrastructure, and has served twice in Fedora Council.",
      "visibility": "public",
      "followers_count": 0,
      "following_count": 0,
      "starred_repos_count": 0,
      "username": "t0xic0der"
    },
    "original_author": "",
    "original_author_id": 0,
    "title": "Fourth issue",
    "body": "Fourth issue",
    "ref": "",
    "assets": [],
    "labels": [
      {
        "id": 4421,
        "name": "cle",
        "exclusive": false,
        "is_archived": false,
        "color": "70c24a",
        "description": "cle",
        "url": "https://forge.fedoraproject.org/api/v1/repos/cle/requests-test/labels/4421"
      }
    ],
    "milestone": null,
    "assignee": null,
    "assignees": null,
    "state": "open",
    "is_locked": false,
    "comments": 0,
    "created_at": "2026-03-25T05:29:15Z",
    "updated_at": "2026-03-25T05:29:56Z",
    "closed_at": null,
    "due_date": null,
    "pull_request": null,
    "repository": {
      "id": 936,
      "name": "requests-test",
      "owner": "cle",
      "full_name": "cle/requests-test"
    },
    "pin_order": 0
  },
  {
    "id": 109886,
    "url": "https://forge.fedoraproject.org/api/v1/repos/cle/requests-test/issues/2",
    "html_url": "https://forge.fedoraproject.org/cle/requests-test/issues/2",
    "number": 2,
    "user": {
      "id": 37,
      "login": "t0xic0der",
      "login_name": "",
      "source_id": 0,
      "full_name": "Akashdeep Dhar",
      "email": "t0xic0der@noreply.forge.fedoraproject.org",
      "avatar_url": "https://forge.fedoraproject.org/avatars/a153d9164ece803b914d3c91c6e72bbd01289e728be545e8ada9b11d0834a189",
      "html_url": "https://forge.fedoraproject.org/t0xic0der",
      "language": "",
      "is_admin": false,
      "last_login": "0001-01-01T00:00:00Z",
      "created": "2025-08-13T10:50:08Z",
      "restricted": false,
      "active": false,
      "prohibit_login": false,
      "location": "Pune, India",
      "pronouns": "he/him/his",
      "website": "https://gridhead.net/",
      "description": "আকাশদীপ ধর (gridhead@fedorable) is a senior software engineer in the Red Hat Community Linux Engineering team, working on researching and developing applications running on Fedora Infrastructure, and has served twice in Fedora Council.",
      "visibility": "public",
      "followers_count": 0,
      "following_count": 0,
      "starred_repos_count": 0,
      "username": "t0xic0der"
    },
    "original_author": "",
    "original_author_id": 0,
    "title": "Second issue",
    "body": "Second issue",
    "ref": "",
    "assets": [],
    "labels": [
      {
        "id": 4421,
        "name": "cle",
        "exclusive": false,
        "is_archived": false,
        "color": "70c24a",
        "description": "cle",
        "url": "https://forge.fedoraproject.org/api/v1/repos/cle/requests-test/labels/4421"
      }
    ],
    "milestone": null,
    "assignee": null,
    "assignees": null,
    "state": "open",
    "is_locked": false,
    "comments": 0,
    "created_at": "2026-03-25T05:29:00Z",
    "updated_at": "2026-03-25T05:29:49Z",
    "closed_at": null,
    "due_date": null,
    "pull_request": null,
    "repository": {
      "id": 936,
      "name": "requests-test",
      "owner": "cle",
      "full_name": "cle/requests-test"
    },
    "pin_order": 0
  }
]

Could you please acknowledge the same that the issue that you mentioned of no longer persists so that this issue ticket could be closed?

@zlopez, I have initialised a repository of the same name, `requests-test` and have created four issue tickets in total there. Two of those issue tickets (i.e. cle/requests-test#2 and cle/requests-test#4) have the label `cle` assigned to them, while the other two of those tickets (i.e. cle/requests-test#1 and cle/requests-test#3) do not. When making the same API request from before, I see the following content. ``` [ { "id": 109888, "url": "https://forge.fedoraproject.org/api/v1/repos/cle/requests-test/issues/4", "html_url": "https://forge.fedoraproject.org/cle/requests-test/issues/4", "number": 4, "user": { "id": 37, "login": "t0xic0der", "login_name": "", "source_id": 0, "full_name": "Akashdeep Dhar", "email": "t0xic0der@noreply.forge.fedoraproject.org", "avatar_url": "https://forge.fedoraproject.org/avatars/a153d9164ece803b914d3c91c6e72bbd01289e728be545e8ada9b11d0834a189", "html_url": "https://forge.fedoraproject.org/t0xic0der", "language": "", "is_admin": false, "last_login": "0001-01-01T00:00:00Z", "created": "2025-08-13T10:50:08Z", "restricted": false, "active": false, "prohibit_login": false, "location": "Pune, India", "pronouns": "he/him/his", "website": "https://gridhead.net/", "description": "আকাশদীপ ধর (gridhead@fedorable) is a senior software engineer in the Red Hat Community Linux Engineering team, working on researching and developing applications running on Fedora Infrastructure, and has served twice in Fedora Council.", "visibility": "public", "followers_count": 0, "following_count": 0, "starred_repos_count": 0, "username": "t0xic0der" }, "original_author": "", "original_author_id": 0, "title": "Fourth issue", "body": "Fourth issue", "ref": "", "assets": [], "labels": [ { "id": 4421, "name": "cle", "exclusive": false, "is_archived": false, "color": "70c24a", "description": "cle", "url": "https://forge.fedoraproject.org/api/v1/repos/cle/requests-test/labels/4421" } ], "milestone": null, "assignee": null, "assignees": null, "state": "open", "is_locked": false, "comments": 0, "created_at": "2026-03-25T05:29:15Z", "updated_at": "2026-03-25T05:29:56Z", "closed_at": null, "due_date": null, "pull_request": null, "repository": { "id": 936, "name": "requests-test", "owner": "cle", "full_name": "cle/requests-test" }, "pin_order": 0 }, { "id": 109886, "url": "https://forge.fedoraproject.org/api/v1/repos/cle/requests-test/issues/2", "html_url": "https://forge.fedoraproject.org/cle/requests-test/issues/2", "number": 2, "user": { "id": 37, "login": "t0xic0der", "login_name": "", "source_id": 0, "full_name": "Akashdeep Dhar", "email": "t0xic0der@noreply.forge.fedoraproject.org", "avatar_url": "https://forge.fedoraproject.org/avatars/a153d9164ece803b914d3c91c6e72bbd01289e728be545e8ada9b11d0834a189", "html_url": "https://forge.fedoraproject.org/t0xic0der", "language": "", "is_admin": false, "last_login": "0001-01-01T00:00:00Z", "created": "2025-08-13T10:50:08Z", "restricted": false, "active": false, "prohibit_login": false, "location": "Pune, India", "pronouns": "he/him/his", "website": "https://gridhead.net/", "description": "আকাশদীপ ধর (gridhead@fedorable) is a senior software engineer in the Red Hat Community Linux Engineering team, working on researching and developing applications running on Fedora Infrastructure, and has served twice in Fedora Council.", "visibility": "public", "followers_count": 0, "following_count": 0, "starred_repos_count": 0, "username": "t0xic0der" }, "original_author": "", "original_author_id": 0, "title": "Second issue", "body": "Second issue", "ref": "", "assets": [], "labels": [ { "id": 4421, "name": "cle", "exclusive": false, "is_archived": false, "color": "70c24a", "description": "cle", "url": "https://forge.fedoraproject.org/api/v1/repos/cle/requests-test/labels/4421" } ], "milestone": null, "assignee": null, "assignees": null, "state": "open", "is_locked": false, "comments": 0, "created_at": "2026-03-25T05:29:00Z", "updated_at": "2026-03-25T05:29:49Z", "closed_at": null, "due_date": null, "pull_request": null, "repository": { "id": 936, "name": "requests-test", "owner": "cle", "full_name": "cle/requests-test" }, "pin_order": 0 } ] ``` Could you please acknowledge the same that the issue that you mentioned of no longer persists so that this issue ticket could be closed?
Author

As the jira_sync is no longer used for forge.fedoraproject.org I can't test it anymore. I'm OK with just closing this as the sync is now done by webhooks and that seems to work.

As the jira_sync is no longer used for forge.fedoraproject.org I can't test it anymore. I'm OK with just closing this as the sync is now done by webhooks and that seems to work.
Member

Yeah, the webhooks make use of the same API endpoints, so I have confirmed them to be working just fine this morning. Thanks for the confirmation, @zlopez - I am going ahead with closing this issue ticket.

Yeah, the webhooks make use of the same API endpoints, so I have confirmed them to be working just fine this morning. Thanks for the confirmation, @zlopez - I am going ahead with closing this issue ticket.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forge/forge#304
No description provided.