Skip to content
Snippets Groups Projects
Commit f7abfaff authored by Nicolas Dandrimont's avatar Nicolas Dandrimont
Browse files

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.
parent a7607abc
No related branches found
Tags v6.7.0
1 merge request!531GitHub: record whether the origin is a fork
Pipeline #9808 passed
swh.core[db] >= 2.22.0
swh.scheduler >= 2.3.0
swh.core[db] >= 3.4.0
swh.scheduler >= 2.4.0
......@@ -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
......
......@@ -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]]):
......
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment