feat(v1.2.0): retry API, dernier commit, tri, coloration, export JSON
- client.py: _get_with_retry (max 2 retries, backoff lineaire), get_latest_commit - collector.py: champ last_commit_date dans RepoData - display.py: colonne "Dernier commit", _sort_repos (name/issues/release/activity), _colorize_milestone_due (rouge/jaune/vert selon echeance) - cli.py: options --sort/-s et --format/-f (table/json) - exporter.py: nouveau module, repos_to_dicts + export_json - 88 tests (35 nouveaux), ruff clean fixes #8, fixes #7, fixes #10, fixes #9, fixes #6 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,7 @@ class RepoData:
|
||||
is_mirror: bool
|
||||
latest_release: dict | None # {tag_name, published_at} ou None
|
||||
milestones: list[dict] # [{title, open_issues, closed_issues, due_on}]
|
||||
last_commit_date: str | None # ISO 8601, ex: "2026-03-10T14:30:00Z"
|
||||
|
||||
|
||||
def _matches_any(name: str, patterns: list[str]) -> bool:
|
||||
@@ -59,6 +60,9 @@ def collect_all(
|
||||
owner = repo["owner"]["login"]
|
||||
name = repo["name"]
|
||||
|
||||
commit = client.get_latest_commit(owner, name)
|
||||
last_commit_date = commit["created"] if commit else None
|
||||
|
||||
result.append(
|
||||
RepoData(
|
||||
name=name,
|
||||
@@ -70,6 +74,7 @@ def collect_all(
|
||||
is_mirror=repo["mirror"],
|
||||
latest_release=client.get_latest_release(owner, name),
|
||||
milestones=client.get_milestones(owner, name),
|
||||
last_commit_date=last_commit_date,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user