swh.lister.pagure.lister module#

class swh.lister.pagure.lister.PagureLister(scheduler: SchedulerInterface, url: str | None = None, 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, per_page=100)[source]#

Bases: StatelessLister[List[Dict[str, Any]]]

List git origins hosted on a Pagure forge.

LISTER_NAME: str = 'pagure'#
API_PROJECTS_ENDPOINT = '/api/0/projects'#
get_pages() Iterator[List[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(projects: List[Dict[str, Any]]) Iterator[ListedOrigin][source]#

Extract a list of model.ListedOrigin from a raw page of results.

Parameters:

page – a single page of results

Returns:

an iterator for the origins present on the given page of results