fix: accurate merged PR detection and open source contribution analysis #134
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🎯 Overview
Fixes #131
Implements accurate merged PR detection and comprehensive external contribution analysis to fairly evaluate candidates' open source involvement.
Test Profile 1 (
akarsh-jain-790):💭 Motivation
I discovered these issues while building my own contribution tracking tool and testing with hiring-agent. Since this is such a valuable project for fair candidate evaluation, I wanted to contribute back and help improve accuracy for the entire community.
The fix ensures that candidates with genuine open source contributions (especially to major projects) are properly recognized and fairly evaluated.
🐛 Issues Fixed
1. Inaccurate Merged PR Detection
Problem: GitHub Search Issues API returns
state: "closed"for both merged and unmerged PRs, causing the system to miscount successful contributions.Solution: Implemented separate API queries for each PR state:
Impact: Correctly identifies merged PRs (tested: 15 merged out of 29 Zulip PRs, previously showed 1)
2. Weak Project Classification
Before (line 191):
After (lines 145-183 - new function
determine_enhanced_project_type):3. Missing External PR Analysis
Added new functionality (lines 533-616):
analyze_open_source_contributions()- Fetches PRs to external reposcalculate_open_source_score()- Quality scoring (0-100)assess_contribution_quality()- Qualitative ratingImpact: Now detects true open source work (PRs to other people's projects)
4. Undefined Variable Bug
Fixed (line 280):
✨ Enhancements
Enhanced Insights Display
Before:
After:
Updated Evaluation Criteria
Enhanced
resume_evaluation_criteria.jinjato:open_source_analysisdata for scoringEnhanced Data Transformation
Added open source analysis section to
convert_github_data_to_text()showing:🧪 Testing
Ollama (gemma3:4b)
✅ Tested with real resume containing GitHub profile
✅ PR detection working accurately
✅ External contributions properly identified
✅ No runtime errors
Edge cases tested:
📊 Impact
Accuracy:
Performance:
DEVELOPMENT_MODE)Looking forward to your review! ✨