launchpad: Drop extra filtering step which is no longer necessary

as the scheduler is now able to deduplicate it when recording listed origins.

Related to T3945
This commit is contained in:
Antoine R. Dumont (@ardumont) 2022-02-17 12:03:43 +01:00
parent c86e4b43f4
commit 4265e5dd77
No known key found for this signature in database
GPG key ID: 52E2E9840D10C3B8

View file

@ -148,19 +148,13 @@ class LaunchpadLister(Lister[LaunchpadListerState, LaunchpadPageType]):
"""
assert self.lister_obj.id is not None
prev_origin_url: Dict[str, Optional[str]] = {"git": None, "bzr": None}
vcs_type, repos = page
for repo in repos:
origin_url = origin(vcs_type, repo)
# filter out origins with invalid URL or origin previously listed
# (last modified repository will be listed twice by launchpadlib)
if (
not origin_url.startswith("https://")
or origin_url == prev_origin_url[vcs_type]
):
# filter out origins with invalid URL
if not origin_url.startswith("https://"):
continue
last_update = repo.date_last_modified
@ -174,8 +168,6 @@ class LaunchpadLister(Lister[LaunchpadListerState, LaunchpadPageType]):
last_update,
)
prev_origin_url[vcs_type] = origin_url
yield ListedOrigin(
lister_id=self.lister_obj.id,
visit_type=vcs_type,