GitHub: record whether the origin is a fork

For now this information is not used downstream, but it can be useful
for specific analysis or one-shot scheduling.
This commit is contained in:
Nicolas Dandrimont 2024-07-17 18:26:57 +02:00
parent a7607abcf9
commit f7abfafffe
4 changed files with 5 additions and 5 deletions

View file

@ -183,6 +183,7 @@ class GitHubLister(Lister[GitHubListerState, List[Dict[str, Any]]]):
url=repo["html_url"],
visit_type="git",
last_update=pushed_at,
is_fork=repo.get("fork"),
)
def commit_page(self, page: List[Dict[str, Any]]):

View file

@ -52,6 +52,7 @@ def check_origin_4321(swh_scheduler: SchedulerInterface, lister: Lister) -> None
assert origin_4321.last_update == datetime.datetime(
2018, 11, 8, 13, 16, 24, tzinfo=datetime.timezone.utc
)
assert origin_4321.is_fork is not None
def check_origin_5555(swh_scheduler: SchedulerInterface, lister: Lister) -> None: