Skip to content

fix: extend gitHub noreply matching to username-typed identities#4110

Open
skwowet wants to merge 2 commits into
mainfrom
bugfix/gh-noreply-merge-suggestions
Open

fix: extend gitHub noreply matching to username-typed identities#4110
skwowet wants to merge 2 commits into
mainfrom
bugfix/gh-noreply-merge-suggestions

Conversation

@skwowet
Copy link
Copy Markdown
Collaborator

@skwowet skwowet commented May 13, 2026

Summary

GitHub noreply addresses (e.g. 123+john@users.noreply.github.com) are stored by git ingest as type=username, not type=email. The noreply parsing logic was gated on type=email, so ~99% of these identities were silently skipped when generating merge suggestions.

Removed the type check, keeping only the verified guard, so noreply matching works for both identity types. parseGitHubNoreplyEmail already returns null for 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=email guard and relying on verified + parseGitHubNoreplyEmail instead, so noreply addresses ingested as type=username are no longer skipped.

This adjustment is applied both when building OpenSearch clauses in memberMergeSuggestions.ts and when computing similarity in MemberSimilarityCalculator.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.

Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
@skwowet skwowet self-assigned this May 13, 2026
Copilot AI review requested due to automatic review settings May 13, 2026 17:37
@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 === email guards around parseGitHubNoreplyEmail(...) 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.

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