Extending the rest api to support cmd line helpers
I wanted to write a script that would show the last X series' related to specific driver (in my case vmwgfx) and could apply them locally. There's a few issues here, I'm not sure if it's worth breaking them down into individual issues:
- curl -s 'https://patchwork.freedesktop.org/api/1.0/projects/dri-devel/series/?name=vmwgfx&submitted_since=2021-4-1' | python -m json.tool seems to skip some series which do have vmwgfx in the name, I'm assuming this is for ones without cover letter. i.e. comparing the above with: curl -s 'https://patchwork.freedesktop.org/api/1.0/projects/dri-devel/series/?submitter=1908&submitted_since=2021-4-1' | python -m json.tool the latter will list { "id": 88876, "last_updated": "2021-04-08T17:22:53.195444", "n_patches": 2, "name": "series starting with [1/2] drm/vmwgfx: Fix the lockdep breakage", ... } while the former won't.
- using: curl -s 'https://patchwork.freedesktop.org/api/1.0/projects/dri-devel/patches/?name=vmwgfx&submitted_since=2021-4-1' | python -m json.tool does list all the changes that have the term vmwgfx but the json has no "series" link so there doesn't seem to be a way to go from a patch to its parent series (you'd want to apply all the patches in the series, not just the one mentioning your bits because they likely depend on those previous patches in the series)
So either
- having a query paramater that could list all the series whose cover or one of the patches contain a specific string
- adding a parent series id to the patch's json would solve this. Also having a way of going from submitter id to name would be great to be able to print a list filtered for e.g. any dri driver in the format of " ".