[PATCH v2 00/10] Add labels support
Stephen Finucane
stephen at that.guru
Sun Oct 14 23:45:31 AEDT 2018
I want to add support for global series states, as noted in #157 [1]
However, to get there we're going to need a boolean open/closed
attribute for 'Patch.state' and to get _there_ we're going to need to
clean up the various 'State' fixtures, as noted in #4 [2].
This series starts work on the latter of these by addressing yet another
issues, #22 [3]. Full details of the feature are provided inline but
tl;dr labels are arbitrary bits of metadata that can be used to
represent some of the more orthogonal states like "RFC" or "Under
Review" along with other maintainer-provided labels. Once we have
support for this, we can build upon it to migrate some of the 'states'
to labels and the 'state' field itself to a boolean field. This is all
in the future though.
[1] https://github.com/getpatchwork/patchwork/issues/157
[2] https://github.com/getpatchwork/patchwork/issues/4
[3] https://github.com/getpatchwork/patchwork/issues/22
Changes since v1:
- Resolve various issues with v1, noted in each comment
Stephen Finucane (10):
fields: Add ColorField
models: Add submission labels
parser: Extract and save labels
parser: Remove matching label from subject prefixes
admin: Group register calls at bottom
admin: Add label views
views: Populate 'project' attribute of PatchForm
views: Add patch labels to web UI
REST: Expose Patch.labels
docs: Add information on labels
docs/usage/overview.rst | 12 ++++
patchwork/admin.py | 65 +++++++++----------
patchwork/api/cover.py | 5 +-
patchwork/api/patch.py | 11 ++--
patchwork/fields.py | 25 +++++++
patchwork/fixtures/default_labels.xml | 9 +++
patchwork/forms.py | 47 +++++++++++++-
patchwork/migrations/0031_add_labels.py | 39 +++++++++++
patchwork/models.py | 35 ++++++++++
patchwork/parser.py | 22 +++++++
.../patchwork/partials/patch-list.html | 8 +++
patchwork/templates/patchwork/submission.html | 7 ++
patchwork/templatetags/patch.py | 24 +++++++
patchwork/tests/api/test_cover.py | 29 +++++++++
patchwork/tests/api/test_patch.py | 28 ++++++++
patchwork/tests/test_parser.py | 23 +++++++
patchwork/tests/utils.py | 15 +++++
patchwork/views/__init__.py | 3 +
patchwork/views/patch.py | 5 +-
.../notes/labels-6d0096c7d8505627.yaml | 18 +++++
20 files changed, 387 insertions(+), 43 deletions(-)
create mode 100644 patchwork/fixtures/default_labels.xml
create mode 100644 patchwork/migrations/0031_add_labels.py
create mode 100644 releasenotes/notes/labels-6d0096c7d8505627.yaml
--
2.17.1
More information about the Patchwork
mailing list