Skip to content

feat: HealthFailed category + GitLab Bearer auth fix - #5

Merged
dsablic merged 3 commits into
dsablic:mainfrom
fabio-DigitalScience:feat/health-classification
Feb 23, 2026
Merged

dsablic merged 3 commits into
dsablic:mainfrom
fabio-DigitalScience:feat/health-classification

Conversation

@fabio-DigitalScience

@fabio-DigitalScience fabio-DigitalScience commented Feb 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • HealthFailed category: Repos where ListCommits returns an error (network, auth, rate limiting) are now classified as "failed" instead of "abandoned", preventing false inflation of abandoned repo counts
  • Error logging: When API errors occur, a <report>.error.log file is automatically written next to the JSON report with categorized entries ([health], [health-details], [ai-estimate], [ai-estimate-detail]) for easy filtering with grep
  • GitLab auth: Switch to Authorization: Bearer header and updated glab config get token CLI command

Test plan

  • go test ./... — all 15 packages pass
  • Tested against 4 GitLab groups with --health-details --ai-estimate
  • Verified error.log written with correct categories (867 entries for grants group)
  • Verified no error.log when there are no errors (data-platform group)
  • Verified JSON report includes "error" field on failed repos

🤖 Generated with Claude Code

fabio-DigitalScience and others added 3 commits February 23, 2026 11:22
When ListCommits returns an error (network, auth, rate limiting), repos
are now classified as "failed" instead of being silently marked
"abandoned". Failed repos are excluded from code percentage calculations
in the health summary to avoid skewing active/maintained/abandoned ratios.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Switch from PRIVATE-TOKEN header to Authorization Bearer for GitLab API
requests, and use `glab config get token` instead of `glab auth token`
for CLI token retrieval.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Write a <report>.error.log file (e.g., report.error.log) next to the
JSON report when API errors occur. Each line is prefixed with a category
([health], [health-details], [ai-estimate], [ai-estimate-detail]) for
easy filtering with grep.

Also adds RepoHealth.Error field to surface failure reasons in JSON
output, and propagates partial errors from AnalyzeDetails and Estimate.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dsablic
dsablic merged commit 5ee25b6 into dsablic:main Feb 23, 2026
1 check passed
dsablic added a commit that referenced this pull request Feb 23, 2026
Update `glab auth token` → `glab config get token` in README and
CLAUDE.md to match the code change from PR #5. Expand the doc-update
convention in CLAUDE.md with specific guidance on where each type of
change should be documented.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@fabio-DigitalScience
fabio-DigitalScience deleted the feat/health-classification branch February 23, 2026 13:52
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