Skip to content

fix : return null for invalid run duration in CI route #503

@tmdeveloper007

Description

@tmdeveloper007

Summary of What Needs to be Done:
The CI route at src/app/api/metrics/ci/route.ts returns 0 for invalid date data in getRunDurationMinutes. This could be confused with a legitimately fast workflow run. Should return null to indicate invalid data.

Changes that Need to be Made:

  • File: src/app/api/metrics/ci/route.ts (lines 46-55)
  • Change return type to number | null and return null for invalid data

Impact that it would Provide:

  • Distinguishes between invalid data and legitimate fast runs
  • Allows calling code to handle invalid data appropriately

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