I’m developing an app that should have part of it show a listing like a PR page listing with pull comments, diff_hunks and review comments. Basically, I want to see the conversation around a PR. Would I use the event timeline to generate this?
Currently, I’m getting the PR comments from the …/issues/:n/comments, diff_hunk from a …/pulls/:n/comments call, and the review comments from the events timeline events[‘event’][‘review’] from …/issues/:n/timeline. I can’t seem to align the data as the GitHub PR page has the review code under the appropriate code_hunk and PR comments dispersed appropriately. How would I approach looping through what data to recreate this? (ie - like PR image below - General PR comment, comment, diff_hunk, review comments.
Edited: I did find on SO: https://stackoverflow.com/questions/46654177/github-api-and-how-to-get-code-snippets-and-comments-for-a-pullwhich tells how to get the comments associated with the diff_hunk, but it’s not clear how to integrate the issue comments for the general PR comments.
Thanks for any advice/pointers!