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

@ -1,4 +1,2 @@
swh.core[db] >= 2.22.0
swh.scheduler >= 2.3.0
swh.core[db] >= 3.4.0
swh.scheduler >= 2.4.0

View file

@ -2,7 +2,7 @@ pandas
pytest >= 8.1
pytest-mock
requests_mock
swh-scheduler[testing] >= 2.3.0
swh-scheduler[testing] >= 2.4.0
types-beautifulsoup4
types-click
types-pyyaml

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: