]> git.ipfire.org Git - thirdparty/patchwork.git/commit
api: support filtering patches by hash
authorDaniel Axtens <dja@axtens.net>
Wed, 23 Oct 2019 14:33:42 +0000 (01:33 +1100)
committerStephen Finucane <stephen@that.guru>
Sat, 30 Nov 2019 16:40:08 +0000 (16:40 +0000)
commitd380219e4dd5e963f7b2b3fb421cd033e70ac5a8
treec392a73e1a5a3a9015f961430430f12fd66e64c9
parent3ed6a1434dd90f073f5db5a6e85a80469aaaed40
api: support filtering patches by hash

This is a feature that the XML-RPC API has, and which is used in
the wild [1], so support it in the REST API.

I tried to version the new filter field, but it's not at all clear
how to do this with django-filters. The best way I could find
requires manually manipulating request.GET, which seems to defeat
the point of django-filters. So document it for 1.2, and have it
work on older versions as an undocumented feature.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/mricon/korg-helpers.git/tree/git-patchwork-bot.py?id=104e7374e1be8458e6d2e82478625a7bf8c822ff

Cc: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Signed-off-by: Daniel Axtens <dja@axtens.net>
Acked-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
docs/api/schemas/latest/patchwork.yaml
docs/api/schemas/patchwork.j2
docs/api/schemas/v1.2/patchwork.yaml
notes/rest-filter-hash-e031bd3db42eb540.yaml [new file with mode: 0644]
patchwork/api/filters.py
patchwork/tests/api/test_patch.py