]> git.ipfire.org Git - thirdparty/patchwork.git/commit
api: allow filtering patches and covers by msgid
authorDaniel Axtens <dja@axtens.net>
Tue, 14 Apr 2020 05:34:40 +0000 (15:34 +1000)
committerDaniel Axtens <dja@axtens.net>
Tue, 14 Apr 2020 13:27:17 +0000 (23:27 +1000)
commitd08b6c72964898c9997a62e4ab6a721f166a56ca
treec505ea706979e56bdf9fa19f6414787ecdbd2e36
parent08c5856444bc2e100c4acbbea0a244cd46083c4b
api: allow filtering patches and covers by msgid

In the process of fixing the previous bug, I realised that:

 a) /api/patches/msgid is a perfectly reasonable thing to attempt
 b) We have no way of finding a patch by message id in the API

We can't actualy make /api/patches/msgid work because it may not
be unique, but we can add a filter.

I'm shoehorning this into stable/2.2, even though it's technically
an API change: it's minor, not incompatible and in hindsight a
glaring hole.

Cc: Michael Ellerman <mpe@ellerman.id.au>
Tested-by: Jeremy Kerr <jk@ozlabs.org>
Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com>
Reviewed-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Daniel Axtens <dja@axtens.net>
docs/api/schemas/latest/patchwork.yaml
docs/api/schemas/patchwork.j2
docs/api/schemas/v1.2/patchwork.yaml
patchwork/api/filters.py
patchwork/tests/api/test_cover.py
patchwork/tests/api/test_patch.py
releasenotes/notes/rest-filter-msgid-41f693cd4e53cf93.yaml [new file with mode: 0644]