Implementation of Gogs Lister
Gogs hosts git repositories so it will be easy to "load" it into swh. It's base url is https://try.gogs.io/api/v1 and to get the projects by page the api is https://try.gogs.io/api/v1/repos/search (default limit is 10 results per page) and the next url can be found in the headers in "Link" (It returns two urls one is the url of next page and the second is the url of last page separated by comma and with some python logic it can be extracted easily). It requires you to have a token which I have downloaded and also you can limit the number of results. In their documentation they have written that they want their api to be like that of github V3 so I think implementation of gogs lister will be similar. The token needs to be sent as a parameter in the request.
Plan:
-
!286 (closed): Implement full-mode lister -
!288 (closed): Implement incremental-mode lister -
#1721 (moved): Run within docker-dev (on the developer's machine) -
#1721 (moved): Open upstream forge ticket to reference the gogs api misbehavior #4423 (closed) -
swh/infra/sysadm-environment#4478 (closed): Deploy to staging -
Call for public review -
If green light, deploy to production
Migrated from T1721 (view on Phabricator)