Closed Tarun-Bhardwaj closed 2 years ago
We use the octokit.rest.issues.listForRepo
endpoint: https://octokit.github.io/rest.js/v18#issues-list-for-repo
It says:
Note: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the pull_request key. Be aware that the id of a pull request returned from "Issues" endpoints will be an issue id. To find out the pull request id, use the "List pull requests" endpoint.
Have you tried the --exportAll
option to see if that "pull_request key" is present?
Yes, I just verified that if you use the --exportAll
option, you can see that PRs have the pull_request.url
column filled, and issues do not. I'm going to say that's a good workflow for this use case.
I was able to successfully download the CSV but it contains both PRs and issues from my repo. Though PRs are also the same as issues in GitHub but is there a way in the extract we can differentiate between the two?