]> git.ipfire.org Git - thirdparty/patchwork.git/commit
api: add comments detail endpoint
authorRaxel Gutierrez <raxel@google.com>
Fri, 20 Aug 2021 04:50:27 +0000 (04:50 +0000)
committerDaniel Axtens <dja@axtens.net>
Mon, 23 Aug 2021 12:11:49 +0000 (22:11 +1000)
commit88f56051c41de5dc643a7ce1c0911974d8cb3c70
tree60ed94b06a8ac7368194ab299dd1b1da4bd5c8fe
parent9c8906150a782cd2a9996f6f60d129a7323b8043
api: add comments detail endpoint

Add new endpoint for patch and cover comments at api/.../comments/<comment_id>.
This involves updating the API version to v1.3 to reflect the new
endpoints as a minor change, following the usual semantic versioning
convention.

The endpoint will make it possible to use the REST API to update the new
`addressed` field for individual patch and cover comments with JavaScript
on the client side. In the process of these changes, clean up the use of
the CurrentPatchDefault context so that it exists in base.py and can be
used throughout the API (e.g. Check and Comment REST endpoints).

The tests cover retrieval and update requests and also handle calls from
the various API versions. Also, they cover permissions for update
requests and handle invalid update values for the new `addressed` field.

Signed-off-by: Raxel Gutierrez <raxel@google.com>
[dja: changes to not conflict with, and to adopt the changes in, fecf7c86c2c5
      various other minor changes as described on list]
Signed-off-by: Daniel Axtens <dja@axtens.net>
docs/api/schemas/generate-schemas.py
docs/api/schemas/patchwork.j2
patchwork/api/base.py
patchwork/api/check.py
patchwork/api/comment.py
patchwork/tests/api/test_comment.py
patchwork/urls.py