swh.lister.tuleap.lister module

class swh.lister.tuleap.lister.TuleapLister(scheduler: swh.scheduler.interface.SchedulerInterface, url: str, instance: Optional[str] = None, credentials: Optional[Dict[str, Dict[str, List[Dict[str, str]]]]] = None)[source]

Bases: swh.lister.pattern.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/'
page_request(url: str, params: Dict[str, Any]) requests.models.Response[source]
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.

Returns

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

get_origins_from_page(page: Dict[str, Any]) Iterator[swh.scheduler.model.ListedOrigin][source]

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