According to http://developer.github.com/v3/pulls/comments/#list-comments-on-a-pull-request
I should be able to get a list of comments by issuing the following curl statement, however, it is returning empty, as if there were no comments, any ideas why? or how I can get this to work?
curl "https://api.github.com/repos/37signals/sub/pulls/37/comments" -v
Thank you!
Review a Pull Request Doing this switches VS Code into Review Mode, it will open the fork and branch of the pull request, and open Changes in Pull Request view, which allows you to see all the commits, and changes made within them, as well as providing you with the view of the diffs.
Type involves:<username> in the search box on the GitHub's main page. This will find all the issues that the specified user commented on, was assigned to or mentioned in.
To reply to an existing line comment, you'll need to navigate to the comment on either the Conversation tab or Files changed tab and add an additional line comment below it. Tips: Pull request comments support the same formatting as regular comments on GitHub, such as @mentions, emoji, and references.
Notice the text near the top of the Pull requests API docs (under the TOC):
The Pull Request API allows you to list, view, edit, create, and even merge pull requests. Comments on pull requests can be managed via the Issue Comments API.
So, the API endpoint you are currently using is intended for Pull request review comments, not the normal Pull request comments:
Pull Request Review Comments are comments on a portion of the unified diff. These are separate from Commit Comments (which are applied directly to a commit, outside of the Pull Request view), and Issue Comments (which do not reference a portion of the unified diff).
Since the pull request you are referencing does not have any review comments, you are getting the correct result (an empty list). However, as I mentioned above, the API endpoint you should be hitting is the one for issue comments (just use the same pull request ID since it is equal to the issue ID):
curl "https://api.github.com/repos/37signals/sub/issues/37/comments" -v
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With