fix: return normalized lowercase name when contributor not found in alias map - #81
Open
Harshit-Mishra2212 wants to merge 1 commit into
Open
Harshit-Mishra2212 wants to merge 1 commit into
Harshit-Mishra2212 wants to merge 1 commit into
Conversation
|
@Harshit-Mishra2212 is attempting to deploy a commit to the SEETA's projects Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
normalizeContributorName()insrc/lib/constants.tslowercases the input into a variable callednormalizedto look up the alias map, but falls back to the originalname(with its original casing) when no alias is found.This means the same contributor can produce different return values depending on how their name was capitalized in Airtable:
These two values are not equal, so the same real person gets treated as two different contributors. More critically, the returned value is used in validateContributions() to match against GitHub issue assignee logins, which are always lowercase. A mixed-case return value will never match a GitHub login, causing real contributions to be marked as discrepancies.
Fixes #54
Changes
|| nameto|| normalizedinnormalizeContributorName()so it always returns the lowercased version when no alias is found📷 Screenshots / Demo (if applicable)
N/A — logic fix. Behaviour before and after:
Additional Notes
One word changed in
src/lib/constants.ts, no other files touched. Alias lookups are completely unaffected since they return directly from the map before hitting the fallback.Checklist