Add gitiles lister

Gitiles instance returns voluntarily a malformed json output (json prefixed with
``)]}'\n``) [2]. The lister deals with it to properly parse the json response
nonetheless. It drops the prefix and then parses the json.

If at some point, they drop this prefix to return json directly, the lister will be able
to deal with it too. There are 2 tests one with 'standard' gitile format and another
with standard json to account for both case.

Refs. swh/meta#5045

[2] https://github.com/google/gitiles/issues/263
This commit is contained in:
Antoine R. Dumont (@ardumont) 2023-07-12 17:46:20 +02:00
parent 573958ce64
commit 3ab856288c
No known key found for this signature in database
GPG key ID: 52E2E9840D10C3B8
12 changed files with 307 additions and 0 deletions

View file

@ -68,6 +68,7 @@ setup(
lister.fedora=swh.lister.fedora:register
lister.gitea=swh.lister.gitea:register
lister.github=swh.lister.github:register
lister.gitiles=swh.lister.gitiles:register
lister.gitlab=swh.lister.gitlab:register
lister.gitweb=swh.lister.gitweb:register
lister.gnu=swh.lister.gnu:register