Overview
Add GitHub archive/activity detection as an opt-in fourth signal to the DM001 maintenance risk detector (see #732 for the initial implementation).
What it adds
When --check-maintenance --check-network is passed, DM001 checks the GitHub repository linked in the package's npm packument for:
- Archived status (repo is read-only/archived)
- No commits in 2+ years
These are stronger signals of abandonment than staleness alone - an archived repo means the maintainer has explicitly declared the project dead.
Why opt-in
GitHub API calls require rate limit handling and optionally a token. This is heavier than npm registry packument fetches. Keeping it behind --check-network (already used by OA007) avoids surprise latency and auth requirements in the default path.
Data source
GitHub REST API - GET /repos/{owner}/{repo} returns archived boolean and pushed_at timestamp. Repo URL parsed from the repository field in the npm packument.
Implementation notes
- Reuse the existing
--check-network opt-in pattern from OA007
- Add
githubArchived?: boolean signal to MaintenanceFinding
- Gracefully skip if no GitHub URL in packument, or if API call fails
- To be done in-house
Related
Overview
Add GitHub archive/activity detection as an opt-in fourth signal to the DM001 maintenance risk detector (see #732 for the initial implementation).
What it adds
When
--check-maintenance --check-networkis passed, DM001 checks the GitHub repository linked in the package's npm packument for:These are stronger signals of abandonment than staleness alone - an archived repo means the maintainer has explicitly declared the project dead.
Why opt-in
GitHub API calls require rate limit handling and optionally a token. This is heavier than npm registry packument fetches. Keeping it behind
--check-network(already used by OA007) avoids surprise latency and auth requirements in the default path.Data source
GitHub REST API -
GET /repos/{owner}/{repo}returnsarchivedboolean andpushed_attimestamp. Repo URL parsed from therepositoryfield in the npm packument.Implementation notes
--check-networkopt-in pattern from OA007githubArchived?: booleansignal toMaintenanceFindingRelated