Changeset View
Changeset View
Standalone View
Standalone View
swh/lister/gitea/lister.py
Show All 29 Lines | ): | ||||
self.PATH_TEMPLATE, | self.PATH_TEMPLATE, | ||||
order, | order, | ||||
limit, | limit, | ||||
) | ) | ||||
def get_model_from_repo(self, repo: Dict[str, Any]) -> Dict[str, Any]: | def get_model_from_repo(self, repo: Dict[str, Any]) -> Dict[str, Any]: | ||||
return { | return { | ||||
"instance": self.instance, | "instance": self.instance, | ||||
"uid": repo["id"], | "uid": f'{self.instance}/{repo["id"]}', | ||||
ardumont: repo["uid"] not id | |||||
Done Inline Actionsrepo["id"] even! ardumont: repo["id"] even! | |||||
"name": repo["name"], | "name": repo["name"], | ||||
"full_name": repo["full_name"], | "full_name": repo["full_name"], | ||||
"html_url": repo["html_url"], | "html_url": repo["html_url"], | ||||
"origin_url": repo["clone_url"], | "origin_url": repo["clone_url"], | ||||
"origin_type": "git", | "origin_type": "git", | ||||
} | } | ||||
def uid(self, id: str) -> str: | |||||
return f"{self.instance}/{id}" | |||||
def get_next_target_from_response(self, response: Response) -> Optional[int]: | def get_next_target_from_response(self, response: Response) -> Optional[int]: | ||||
"""Determine the next page identifier. | """Determine the next page identifier. | ||||
""" | """ | ||||
if "next" in response.links: | if "next" in response.links: | ||||
next_url = response.links["next"]["url"] | next_url = response.links["next"]["url"] | ||||
return self.get_page_from_url(next_url) | return self.get_page_from_url(next_url) | ||||
return None | return None | ||||
Show All 35 Lines |
repo["uid"] not id