swh.lister.tuleap.lister module#

class swh.lister.tuleap.lister.TuleapLister(scheduler: SchedulerInterface, url: str, instance: str | None = None, credentials: Dict[str, Dict[str, List[Dict[str, str]]]] | None = None, max_origins_per_page: int | None = None, max_pages: int | None = None, enable_origins: bool = True)[source]#

Bases: StatelessLister[Dict[str, Any]]

List origins from Tuleap.

Tuleap provides SVN and Git repositories hosting.

Tuleap API getting started: https://tuleap.net/doc/en/user-guide/integration/rest.html Tuleap API reference: https://tuleap.net/api/explorer/

Using the API we first request a list of projects, and from there request their associated repositories individually. Everything is paginated, code uses throttling at the individual GET call level.

LISTER_NAME: str = 'tuleap'#
REPO_LIST_PATH = '/api'#
REPO_GIT_PATH = 'plugins/git/'#
REPO_SVN_PATH = 'plugins/svn/'#
classmethod results_simplified(url: str, repo_type: str, repo: Dict[str, Any]) Dict[str, Any][source]#
get_pages() Iterator[Dict[str, Any]][source]#

Retrieve a list of pages of listed results. This is the main loop of the lister.


an iterator of raw pages fetched from the platform currently being listed.

get_origins_from_page(page: Dict[str, Any]) Iterator[ListedOrigin][source]#

Convert a page of Tuleap repositories into a list of ListedOrigins.