rifle: smart reviewer selection; alternative to blunderbuss - #787
Conversation
|
Skipping CI for Draft Pull Request. |
✅ Deploy Preview for k8s-prow ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
b878716 to
1882614
Compare
1882614 to
9172af1
Compare
|
/hold going to make this into a new plugin so the old algorithm can be used by those that want it |
Split the blunderbuss plugin into two mutually exclusive plugins in a shared review_assignment package: blunderbuss (random selection, original behavior) and rifle (blame-based scoring). This addresses review feedback that changing blunderbuss defaults would concentrate review load and work against the contributor-ladder model.
Move shared reviewer-selection infrastructure (interfaces, GetReviewers, FindReviewer, IsUserBusy, etc.) to pkg/reviewer/ as exported symbols. Restore pkg/plugins/blunderbuss/ for random selection and create pkg/plugins/rifle/ for blame-based selection as independent plugin packages that import from pkg/reviewer/.
- Aggregate errors in handleStatus loop instead of returning only the last iteration's error. Also change early returns to continues so all matching PRs are processed. - Handle org/repo inheritance in validateMutuallyExclusivePlugins so configuring blunderbuss at org level and rifle at repo level (or vice versa) is caught, respecting ExcludedRepos.
|
/hold cancel |
blunderbuss: smart reviewer selection using git blame scoringrifle: smart reviewer; alternative to blunderbuss
rifle: smart reviewer; alternative to blunderbussrifle: smart reviewer selection; alternative to blunderbuss
- Fix alphabetical import ordering for rifle in checkconfig and plugin-imports files - Fix orphaned doc comment on GetBlame in fakegithub, add BlameData field so tests can configure blame responses - Add defaultRifleReviewerCount constant instead of reusing defaultBlunderbussReviewerCount - Rewrite TestReviewerScorer to call scoreReviewers instead of manually replicating scoring logic - Add MostRecentDate assertions to TestIntersectBlameWithChanges
|
What's the additional GitHub API quota load of this approach? |
Up to 20 additional REST API calls for Keep in mind, utilizing I will look into adding docs to clarify this. |
When all candidates are busy, the selector returns "" without modifying the candidate set, causing the loop condition to remain true forever. Break out of both reviewer selection loops when the selector returns empty to prevent this.
Document the rifle plugin as a blame-based alternative to blunderbuss for reviewer selection, including its algorithm, GitHub API quota impact, and fallback behavior.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: smg247 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
rifleacts as a, mutually exclusive, smart alternative plugin toblunderbuss. It replaces random reviewer selection with blame-based scoring that ranks OWNERS candidates by code contribution to changed files.Implements: #780