Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7123814
D6287.id22864.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D6287.id22864.diff
View Options
diff --git a/swh/lister/gitlab/lister.py b/swh/lister/gitlab/lister.py
--- a/swh/lister/gitlab/lister.py
+++ b/swh/lister/gitlab/lister.py
@@ -97,16 +97,17 @@
"""
- LISTER_NAME = "gitlab"
-
def __init__(
self,
scheduler,
url: str,
+ name: Optional[str] = "gitlab",
instance: Optional[str] = None,
credentials: Optional[CredentialsType] = None,
incremental: bool = False,
):
+ if name is not None:
+ self.LISTER_NAME = name
super().__init__(
scheduler=scheduler,
url=url.rstrip("/"),
diff --git a/swh/lister/gitlab/tests/test_lister.py b/swh/lister/gitlab/tests/test_lister.py
--- a/swh/lister/gitlab/tests/test_lister.py
+++ b/swh/lister/gitlab/tests/test_lister.py
@@ -57,11 +57,16 @@
def test_lister_gitlab_heptapod(datadir, swh_scheduler, requests_mock):
- """Gitlab lister ignores some vcs_type
+ """Heptapod lister happily lists hg, hg_git as hg and git origins
"""
+ name = "heptapod"
instance = "foss.heptapod.net"
- lister = GitLabLister(swh_scheduler, url=api_url(instance), instance=instance)
+ lister = GitLabLister(
+ swh_scheduler, url=api_url(instance), name=name, instance=instance
+ )
+ assert lister.LISTER_NAME == name
+
response = gitlab_page_response(datadir, instance, 1)
requests_mock.get(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Dec 20 2024, 2:52 AM (11 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3219316
Attached To
D6287: Allow gitlab lister's name to be overriden by task arguments
Event Timeline
Log In to Comment