fix: extend gitHub noreply matching to username-typed identities#4110
fix: extend gitHub noreply matching to username-typed identities#4110skwowet wants to merge 2 commits into
Conversation
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
There was a problem hiding this comment.
Pull request overview
This PR fixes GitHub noreply address handling in the merge suggestions pipeline by ensuring noreply parsing is not gated on MemberIdentityType.EMAIL (since git ingest stores most noreply addresses as type=username). This improves member-merge matching accuracy for GitHub-derived identities without introducing false positives because parseGitHubNoreplyEmail returns null for non-noreply values.
Changes:
- Removed
type === emailguards aroundparseGitHubNoreplyEmail(...)so verified noreply values are parsed regardless of identity type. - Updated inline documentation/comments to reflect that noreply values can be stored as
type=username.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| services/apps/merge_suggestions_worker/src/memberSimilarityCalculator.ts | Removes the identity-type gate when checking bidirectional noreply→GitHub-username similarity. |
| services/apps/merge_suggestions_worker/src/activities/memberMergeSuggestions.ts | Removes the identity-type gate when extracting noreply-derived usernames for OpenSearch query clause construction. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
GitHub noreply addresses (e.g.
123+john@users.noreply.github.com) are stored by git ingest astype=username, nottype=email. The noreply parsing logic was gated ontype=email, so ~99% of these identities were silently skipped when generating merge suggestions.Removed the type check, keeping only the
verifiedguard, so noreply matching works for both identity types.parseGitHubNoreplyEmailalready returnsnullfor non-noreply values so there's no false-positive risk.Note
Medium Risk
Expands merge-candidate matching logic, which can change who gets suggested for merges and may increase false positives if any verified non-noreply values accidentally parse as noreply.
Overview
Fixes GitHub noreply-based merge matching by removing the identity
type=emailguard and relying onverified+parseGitHubNoreplyEmailinstead, so noreply addresses ingested astype=usernameare no longer skipped.This adjustment is applied both when building OpenSearch clauses in
memberMergeSuggestions.tsand when computing similarity inMemberSimilarityCalculator.hasMatchingUsernameFromNoreplyEmail(bidirectional noreply-to-username checks).Reviewed by Cursor Bugbot for commit dedb570. Bugbot is set up for automated code reviews on this repo. Configure here.