Comment resources are currently child resources of reviews. This limits the type
of queries we can do for comments, for example we can't query for all diff
comments created by a given user.
This change adds top-level API endpoints for comments. We register root list
resources for diff comments, file attachment comments and general comments and
support GET requests for the resources with the following query parameters:
- review-request-id=<review-request-id>
, review-id=<review-id>
,
user=<user-username>
, is-reply
for all
- file-diff-id
, line
and interdiff-revision
for diff comments
- file-attachment-id
and file-name
for file attachment comments
This change also improves the docstrings and code readability for base diff
comments, base file attachment comments, and base general review comments.
Based on work by Chaoyu Xiang at /r/12037.