swh.lister.phabricator.lister module#
- class swh.lister.phabricator.lister.PhabricatorLister(scheduler: SchedulerInterface, url: str, instance: Optional[str] = None, api_token: Optional[str] = None, credentials: Optional[Dict[str, Dict[str, List[Dict[str, str]]]]] = None, max_origins_per_page: Optional[int] = None, max_pages: Optional[int] = None, enable_origins: bool = True)[source]#
Bases:
StatelessLister
[List
[Dict
[str
,Any
]]]List all repositories hosted on a Phabricator instance.
- Parameters:
url – base URL of a phabricator forge (for instance https://forge.softwareheritage.org)
instance – string identifier for the listed forge, URL network location will be used if not provided
api_token – authentication token for Conduit API
- API_REPOSITORY_PATH = '/api/diffusion.repository.search'#
- get_request_params(after: Optional[str]) Dict[str, str] [source]#
Get the query parameters for the request.
- static filter_params(params: Dict[str, str]) Dict[str, str] [source]#
Filter the parameters for debug purposes
- 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.