[PATCH v3 0/5] Add bundles to the REST API

Stephen Finucane stephen at that.guru
Fri Mar 17 09:07:23 AEDT 2017


This is mostly explained in the final patch of the series, but when working on
git-pw [1] I came to the conclusion that having the ability to download bundles
was probably something we should continue to support. Series do a lot, but they
don't offer the configurability of bundles (nor will they ever).

This series does some cleanup around bundle-related features before exposing
these resources via the API.

[1] https://github.com/stephenfin/git-pw/

Changes since v2:
- Add unit tests

Changes since v1:
- Add support for basic auth to allow downloading of bundle mboxes using REST
  API clients
- Add '/bundles' to '/' index page

Stephen Finucane (5):
  REST: Prefetch Series.project
  models: Add 'mbox_url' permalink for bundles
  views: Stop using Bundle.public_url
  views: Allow use of basic auth for bundle mboxes
  REST: Add '/bundle' endpoint

 patchwork/api/bundle.py                    | 80 ++++++++++++++++++++++++++++++
 patchwork/api/filters.py                   |  8 +++
 patchwork/api/index.py                     |  1 +
 patchwork/api/series.py                    |  2 +-
 patchwork/models.py                        | 18 ++-----
 patchwork/templates/patchwork/bundles.html |  5 +-
 patchwork/tests/test_rest_api.py           | 77 ++++++++++++++++++++++++++++
 patchwork/urls.py                          |  7 +++
 patchwork/views/bundle.py                  | 10 +++-
 patchwork/views/xmlrpc.py                  |  2 +-
 10 files changed, 191 insertions(+), 19 deletions(-)
 create mode 100644 patchwork/api/bundle.py

-- 
2.9.3



More information about the Patchwork mailing list