Retrieving pull request reviews... #3993
-
|
I've been playing recently with the pull requests and the CLI (v1.12.1) and haven't figured out how to show all the reviews for a given PR and the comments that may have been added for each of them. Obviously you can retrieve the raw data leveraging the API, and enhance developer experience by adding an alias... but in the end, the solution would be a JSON excerpt (regardless you use a Has anybody figured out how to do this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
|
Right now there are no built-in features to fetch all reviews together with review comments from gh. You can do this You can use |
Beta Was this translation helpful? Give feedback.
-
|
Sorry to resurrect a dead thread, but it might be interesting to re-evaluate this in the context of copilot chat/claude/etc. If we had the opportunity for these tools to leverage |
Beta Was this translation helpful? Give feedback.
Right now there are no built-in features to fetch all reviews together with review comments from gh. You can do this
gh pr view --json reviewsto get JSON data about all reviews on a PR, but that only fetches the main review body plus its state and author, but not the line comments itself.You can use
gh apito manually make the API request to fetch all review comments, but to do that you will have to study GitHub's API documentation a bit and then, after fetching all information about line comments, you will have to decide how to present them. (That last part is not trivial and it's the large reason why we haven't built this ourselves.)