Skip to content

feat(analyzer): implement IssueHealth and PRHealth calculations for RecruiterSummary #260#456

Open
Shubham-Gotawade wants to merge 1 commit into
agnivo988:mainfrom
Shubham-Gotawade:feature-recruiter-metrics-260
Open

feat(analyzer): implement IssueHealth and PRHealth calculations for RecruiterSummary #260#456
Shubham-Gotawade wants to merge 1 commit into
agnivo988:mainfrom
Shubham-Gotawade:feature-recruiter-metrics-260

Conversation

@Shubham-Gotawade

@Shubham-Gotawade Shubham-Gotawade commented Jun 5, 2026

Copy link
Copy Markdown

Contributed as part of GSSoC '26.

Problem Description

The RecruiterSummary data model contained structural fields for IssueHealth and PRHealth that were left completely unassigned inside the metrics factory layer. Additionally, the terminal visualization exporter completely omitted these values, causing generated output summaries to miss crucial project maintenance health telemetry. Fixes #260.

Solution Implemented

  1. Algorithmic Threshold Scoring: Updated BuildRecruiterSummary in internal/analyzer/recruiter_summary.go to compute status bounds based on explicit repository metrics parameters:
    • IssueHealth: Evaluated from absolute open issue counts (<20 = "Healthy", 20-49 = "Backlogged", >=50 = "Critical").
    • PRHealth: Evaluated from pull request merge percentages (>60% = "Active", 30%-60% = "Slow", <30% = "Stalled").
  2. Upstream Data Sourcing: Refactored cmd/analyze.go to collect a 100-item pull request sample via client.GetPullRequestsWithLimit, dynamically parsing the merge-to-total ratio and routing parameters cleanly down into the summary factory.
  3. Terminal Telemetry Presentation: Updated the printer layer within internal/output/recruiter.go to output structured formatting definitions for 🐛 Issue Health and 📥 PR Health.
  4. Boundary Unit Test Coverage: Authored table-driven test criteria inside internal/analyzer/recruiter_summary_test.go checking all threshold tiers, confirming valid string assignments across exact edge-case boundaries.

Verification & Test Logs

Validated across localized testing paths:

  • go test -v ./internal/analyzer/...: PASSED (All health metric boundaries validated)
  • go build ./...: PASSED (Clean binary compilation)

@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@Shubham-Gotawade, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 2 minutes and 36 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 60945ed6-11bb-484b-951f-83a8a0c02fb9

📥 Commits

Reviewing files that changed from the base of the PR and between 6d6fa89 and 0c79fda.

📒 Files selected for processing (7)
  • cmd/analyze.go
  • internal/analyzer/recruiter_summary.go
  • internal/analyzer/recruiter_summary_test.go
  • internal/output/compare.go
  • internal/output/compare_html.go
  • internal/output/compare_test.go
  • internal/output/recruiter.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

enhancement: recruiter summary missing IssueHealth and PRHealth - two fields in the struct are always blank in output

1 participant