Skip to content

Invert healthycode repo score and update scan_repo_health output - #2238

Merged
ziadhany merged 2 commits into
aboutcode-org:mainfrom
ziadhany:update-repo-health
Sep 23, 2026
Merged

ziadhany merged 2 commits into
aboutcode-org:mainfrom
ziadhany:update-repo-health

Conversation

@ziadhany

@ziadhany ziadhany commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

scan_repo_health Pipeline new output:

{
  "vcs_url": "https://github.com/expressjs/express.git",
  "scoring_model": "npm-health-0.1",
  "score": 1.0,
  "commit_range": {
    "first_commit": "9a7afb2886247603ebd69a1c8ee5d2f29542a6c0",
    "first_commit_date": "2025-09-25T07:20:45+02:00",
    "last_commit": "9a34acf03cb818ff3f8bc40e44176e277a25cbb9",
    "last_commit_date": "2026-09-15T19:52:26+02:00"
  },
  "run_start_date": "2026-09-22T13:50:27.766396+00:00",
  "run_end_date": "2026-09-22T13:50:29.824835+00:00",
  "metrics": {
    "active_branches": 33,
    "casual_regular_contributors_rate": 0.0,
    "coefficient_of_variation": 0.5622282292118119,
    "commit_size_added_lines": 3660,
    "commit_size_removed_lines": 2746,
    "commits_over_periods_rate": 1.0,
    "commits_per_month": 12.0,
    "commits_per_week": 2.8,
    "commits_per_year": 146.0,
    "contributor_growth": -3,
    "contributor_growth_rate": -0.1111111111111111,
    "days_since_last_commit": 6,
    "developer_categories_casual": 0,
    "developer_categories_core": 13,
    "developer_categories_regular": 30,
    "elephant_factor": 1,
    "file_types_binary": 0,
    "file_types_code": 58,
    "file_types_other": 203,
    "found_file_adopters": 0,
    "found_file_license": 1,
    "message_size_mean": 368.5821917808219,
    "message_size_median": 254,
    "message_size_total": 53813,
    "pony_factor": 3,
    "recent_commits": 146,
    "recent_contributors": 43,
    "recent_organizations": 8,
    "returning_contributors": 0,
    "total_commits": 146,
    "total_contributors": 43,
    "total_organizations": 8
  }
}

Changes:

  • Invert the score so that 1 means healthy and 0 means unhealthy.
  • Update the pipeline JSON output to include commit_range, run_start_date, and run_end_date, and sort metrics items

Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
@ziadhany ziadhany changed the title Update format_metrics_output function for scan_repo_health Invert healthycode repo score and update scan_repo_health output Sep 23, 2026

@keshav-space keshav-space left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ziadhany, LGTM!

@ziadhany
ziadhany merged commit 9bc6377 into aboutcode-org:main Sep 23, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants