Skip to content

Fix scan_repo_health pipeline - #2241

Merged
ziadhany merged 2 commits into
mainfrom
fix_repo_health_code
Sep 23, 2026
Merged

ziadhany merged 2 commits into
mainfrom
fix_repo_health_code

Conversation

@TG1999

@TG1999 TG1999 commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Issues

  • Closes: #

Changes

Checklist

  • I have read the contributing guidelines
  • I have linked an existing issue above
  • I have added unit tests covering the new code
  • I have reviewed and understood every line of this PR

Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
@TG1999
TG1999 requested a review from ziadhany September 23, 2026 15:41
Comment thread scanpipe/pipes/repo_health.py Outdated
except subprocess.SubprocessError:
raise RuntimeError("Grimoirelab-metrics client failure")
except subprocess.SubprocessError as e:
raise RuntimeError(f"Grimoirelab-metrics client failure: {e}") from e

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This will expose the pipeline credentials if we have an error.

…tion

Add a test for normalize_score_and_model

Signed-off-by: ziad hany <ziadhany2016@gmail.com>
@ziadhany

Copy link
Copy Markdown
Collaborator

Pipeline output example:

{
  "vcs_url": "https://github.com/react/react.git",
  "scoring_model": "npm-health-0.1",
  "score": 1.0,
  "commit_range": {
    "first_commit": "cad813ac1ed5c04c6ccb390a3bdf5fedbbacaa45",
    "first_commit_date": "2025-09-23T08:49:16+02:00",
    "last_commit": "6ff6a0a39e61af7511ea229cc5ebbb8979240ac5",
    "last_commit_date": "2026-09-22T10:36:07-07:00"
  },
  "run_start_date": "2026-09-23T17:13:20.736059+00:00",
  "run_end_date": "2026-09-23T17:13:26.904856+00:00",
  "metrics": {
    "active_branches": 356,
    "casual_regular_contributors_rate": 1.7636363636363637,
    "coefficient_of_variation": 0.5055550045835718,
    "commit_size_added_lines": 1247862,
    "commit_size_removed_lines": 857890,
    "commits_over_periods_rate": 1.0,
    "commits_per_month": 229.2328767123288,
    "commits_per_week": 53.48767123287671,
    "commits_per_year": 2789.0,
    "contributor_growth": 20,
    "contributor_growth_rate": 0.23809523809523808,
    "days_since_last_commit": 0,
    "developer_categories_casual": 97,
    "developer_categories_core": 22,
    "developer_categories_regular": 33,
    "elephant_factor": 2,
    "file_types_binary": 0,
    "file_types_code": 26913,
    "file_types_other": 10948,
    "found_file_adopters": 0,
    "found_file_license": 1,
    "message_size_mean": 687.0799569738257,
    "message_size_median": 452,
    "message_size_total": 1916266,
    "pony_factor": 8,
    "recent_commits": 2789,
    "recent_contributors": 152,
    "recent_organizations": 36,
    "returning_contributors": 0,
    "total_commits": 2789,
    "total_contributors": 152,
    "total_organizations": 36
  }
}

@ziadhany
ziadhany merged commit 59414cc into main Sep 23, 2026
12 checks passed
@ziadhany
ziadhany deleted the fix_repo_health_code branch September 23, 2026 17:22
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