Skip to content

fix : use null for daysSinceLastCommit when no commits #506

@tmdeveloper007

Description

@tmdeveloper007

Summary of What Needs to be Done:
The repo-health route uses 9999 as a sentinel value for no commits. This arbitrary value could conflict with actual valid values and is treated as a valid number in scoring.

Changes that Need to be Made:

  • File: src/app/api/metrics/repo-health/route.ts (line 157)
  • Return null instead of 9999 when there are no commits
  • Update computeHealthScore to handle null daysSinceLastCommit

Impact that it would Provide:

  • Clearer semantics for no-commit case
  • Prevents incorrect scoring when repo has no commits

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions