My goal is to collect all comments on a PR. I always thought that in GitHub PRs are issues. However, when I want to get all comments on an PR (let’s take this one as an example), I recognize a difference between PR comments and issue comments through the REST API:
[988239459, 988246552, 988274918] are the issue comment IDs,
[764333623, 764334882] are the PR comments, and
[825738260, 825739988, 825741195] are the PR review comments.
So, there is no equivalence between issue and PR for comments?
They’re at least slightly different animals.
For fun there can also be comments on commits (which can be transiently visible from a PR, until the branch no longer contains them).
- I can attach a comment to a commit.
- I can then make a branch with that commit.
- I can make a PR from that branch to some other branch.
- I can comment on the PR using the green comment button at the bottom of the PR – this would be the same comment button I would use to comment on an issue and is thus via the issue api.
- I can draft comments on the PR content (PR comment?)
- I can click
Files changed, and then click the green
Review changes, enter a comment, and then click
Submit review (PR review comment?)
They have similar properties, but they’re produced differently and can be rendered differently…