Home:ALL Converter>Using the GitHub API how can I find the card id that is linked to a specific issue without iterating through the cards in a project?

Using the GitHub API how can I find the card id that is linked to a specific issue without iterating through the cards in a project?

Ask Time:2021-11-24T00:47:55         Author:nmajor

Json Formatter

The end result is I am trying to start with an issue number (tied to an issue card on a project) and programmatically move it to a different column.

I've found this endpoint POST /projects/columns/cards/{card_id}/moves moves the card. This requires the ID of the card.

So I'm looking for a clean way to start with an issue number and get the card id for the card connected to that issue.

Each card object has the content_url field which seems to be what makes a card an "issue card", however there is no way shown in the documentation to try to search for a card with a specific content_id.

Of course, I can just request the GET /projects/columns/{column_id}/cards endpoint to get a list of all the cards in the column and iterate through until I find one that has a content_id that matches the url for the issue, but I'm wondering if there is another way.

Author:nmajor,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/70084682/using-the-github-api-how-can-i-find-the-card-id-that-is-linked-to-a-specific-iss
yy