Changeset View
Changeset View
Standalone View
Standalone View
swh/lister/phabricator/lister.py
Show All 14 Lines | |||||
class PhabricatorLister(IndexingHttpLister): | class PhabricatorLister(IndexingHttpLister): | ||||
PATH_TEMPLATE = '?order=oldest&attachments[uris]=1&after=%s' | PATH_TEMPLATE = '?order=oldest&attachments[uris]=1&after=%s' | ||||
DEFAULT_URL = 'https://forge.softwareheritage.org/api/diffusion.repository.search' # noqa | DEFAULT_URL = 'https://forge.softwareheritage.org/api/diffusion.repository.search' # noqa | ||||
MODEL = PhabricatorModel | MODEL = PhabricatorModel | ||||
LISTER_NAME = 'phabricator' | LISTER_NAME = 'phabricator' | ||||
def __init__(self, api_baseurl=None, instance=None, override_config=None): | def __init__(self, url=None, instance=None, override_config=None): | ||||
super().__init__(api_baseurl=api_baseurl, | super().__init__(url=url, override_config=override_config) | ||||
override_config=override_config) | |||||
if not instance: | if not instance: | ||||
instance = urllib.parse.urlparse(self.api_baseurl).hostname | instance = urllib.parse.urlparse(self.url).hostname | ||||
self.instance = instance | self.instance = instance | ||||
@property | @property | ||||
def default_min_bound(self): | def default_min_bound(self): | ||||
"""Starting boundary when `min_bound` is not defined (db empty). This | """Starting boundary when `min_bound` is not defined (db empty). This | ||||
is used within the fn:`run` call. | is used within the fn:`run` call. | ||||
""" | """ | ||||
▲ Show 20 Lines • Show All 119 Lines • Show Last 20 Lines |