]> git.ipfire.org Git - thirdparty/patchwork.git/commit
REST: Add '/bundle' endpoint
authorStephen Finucane <stephen@that.guru>
Tue, 21 Feb 2017 16:22:41 +0000 (11:22 -0500)
committerStephen Finucane <stephen@that.guru>
Mon, 20 Mar 2017 19:15:09 +0000 (19:15 +0000)
commit9b81f1aed6cf9a5d223b9f788223f244a8a03215
treea2dee2bbf1be53c98d64fb3a2c620ed36dda2c4b
parent0b4f508a84389fd2b3a9c2a5cfc2128468f2c600
REST: Add '/bundle' endpoint

I had initially resisted adding a '/bundle' endpoint to the API as I
wanted to kill this feature in favour of series. However, series are not
a like-for-like replacement for bundles. Among other things, series do
not provide the composability of bundles: bundles can be manually
created, meaning you can use bundles to group not only multiple patches
but also multiple series (or at least the patches in those series).

Seeing as we're not getting rid of this feature, we should expose it via
the API. Bundles are little unusual, in that they can be public or
private, thus, we should only show bundles that are public or belonging
to the currently authenticated user, if any. For now, this is a
read-only endpoint. We may well allow creation of bundles via the API
once we figure out how to do this cleanly.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
patchwork/api/bundle.py [new file with mode: 0644]
patchwork/api/filters.py
patchwork/api/index.py
patchwork/tests/test_rest_api.py
patchwork/urls.py