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
parent
573958ce
No related branches found
No related tags found
Showing
- setup.py 1 addition, 0 deletionssetup.py
- swh/lister/gitiles/__init__.py 12 additions, 0 deletionsswh/lister/gitiles/__init__.py
- swh/lister/gitiles/lister.py 82 additions, 0 deletionsswh/lister/gitiles/lister.py
- swh/lister/gitiles/tasks.py 16 additions, 0 deletionsswh/lister/gitiles/tasks.py
- swh/lister/gitiles/tests/__init__.py 0 additions, 0 deletionsswh/lister/gitiles/tests/__init__.py
- swh/lister/gitiles/tests/data/https_android.googlesource.com/,format=json 35 additions, 0 deletions...es/tests/data/https_android.googlesource.com/,format=json
- swh/lister/gitiles/tests/data/https_android.googlesource.com/README 2 additions, 0 deletions.../gitiles/tests/data/https_android.googlesource.com/README
- swh/lister/gitiles/tests/data/https_gerrit.googlesource.com/,format=json 16 additions, 0 deletions...les/tests/data/https_gerrit.googlesource.com/,format=json
- swh/lister/gitiles/tests/data/https_gerrit.googlesource.com/README 2 additions, 0 deletions...r/gitiles/tests/data/https_gerrit.googlesource.com/README
- swh/lister/gitiles/tests/test_lister.py 110 additions, 0 deletionsswh/lister/gitiles/tests/test_lister.py
- swh/lister/gitiles/tests/test_tasks.py 28 additions, 0 deletionsswh/lister/gitiles/tests/test_tasks.py
- swh/lister/tests/test_cli.py 3 additions, 0 deletionsswh/lister/tests/test_cli.py
swh/lister/gitiles/__init__.py
0 → 100644
swh/lister/gitiles/lister.py
0 → 100644
swh/lister/gitiles/tasks.py
0 → 100644
swh/lister/gitiles/tests/__init__.py
0 → 100644
swh/lister/gitiles/tests/test_lister.py
0 → 100644
swh/lister/gitiles/tests/test_tasks.py
0 → 100644
Please register or sign in to comment