Devarshi Goswami
Devarshi Goswami

Reputation: 1225

gihtub API get issues using repository ID as parameter

Thanks for taking the time to read this!

It is possible to get all/open/closed issues from the GitHub repo using this API endpoint

https://api.github.com/{org}/{repo}/issues..

couldn't find anything in the docs, but I wanted to make sure if there is a way to pull the same information using repository id? since repo id is unique for any GitHub repo something like

https://api.github.com/{repository_id}/issues

Upvotes: 1

Views: 663

Answers (1)

Ayala
Ayala

Reputation: 1164

You can use https://api.github.com/repositories/{repository_id}/issues

Add ?state=<closed/open> to filter the results. For example: https://api.github.com/repositories/23096959/issues?state=closed

This API is undocumented, but according to GitHub support it can be relied on.

Relevant github pr: https://github.com/piotrmurach/github/pull/284

Upvotes: 2

Related Questions