fix: replace organization IDs with names in mentors table (#85)#87
fix: replace organization IDs with names in mentors table (#85)#87Rishabhpal07 wants to merge 1 commit into
Conversation
|
@Rishabhpal07 is attempting to deploy a commit to the Ketan's Personal Team on Vercel. A member of the Team first needs to authorize it. |
|
Warning
|
| Cohort / File(s) | Summary |
|---|---|
Configuration .gitignore |
Added .env to ignored files list |
Yearly Page Component app/yearly/[slug]/page.tsx |
Changed MentorsContributorsTable data mapping to fall back to p.title instead of p.org_slug for org_name resolution |
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~8 minutes
Poem
A rabbit hops through code so fine, 🐰
Where org names refused to shine,
Numbers danced where names should be—
Now titles bloom wild and free! ✨
One .env tucked away to hide,
The yearly page fixed with pride! 🌟
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 inconclusive)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Out of Scope Changes check | ❓ Inconclusive | The .gitignore change (.env entry) is a minor housekeeping change unrelated to the primary objective of fixing organization name display, though the impact is minimal. | Consider separating the .env .gitignore entry into a separate PR to keep this PR focused on the organization names fix, or provide justification for including it with this change. |
✅ Passed checks (4 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title clearly and concisely describes the main fix: replacing organization IDs with names in the mentors table, matching the primary change in the changeset. |
| Description check | ✅ Passed | The description covers what was fixed, changes made, related issue, and testing, though it doesn't fully align with the template structure (missing explicit checklist items). |
| Linked Issues check | ✅ Passed | The code change in the yearly page (using p.title as fallback instead of p.org_slug) directly addresses issue #85 by fixing the display of organization names instead of IDs in the Mentors table. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing touches
- 📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
app/yearly/[slug]/page.tsx (1)
435-440: Use a safer org_name fallback than project title.
The fallback|| p.titledisplays a project title as the organization name when the org lookup fails. SinceProjectSnapshotlacks anorg_namefield, use"Unknown organization"or theorg_sluginstead to avoid mislabeling in theMentorsContributorsTabledisplay and search.Suggested fix
- data={data.projects.map(p => ({ - org_name: organizations.find(o => o.slug === p.org_slug)?.name || p.title, - org_slug: p.org_slug, - mentors: p.mentors || [], - contributors: p.contributor ? [p.contributor] : [] - }))} + data={data.projects.map(p => ({ + org_name: organizations.find(o => o.slug === p.org_slug)?.name ?? "Unknown organization", + org_slug: p.org_slug, + mentors: p.mentors || [], + contributors: p.contributor ? [p.contributor] : [] + }))}
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ketankauntia
left a comment
There was a problem hiding this comment.
You need to check it thoroughly, its showing project titles instead of org name.
Also, attach an ss when you make ui visible changes, it will be easier and faster to check.
|
You’re right- |
|
@Rishabhpal07 are you working on this? [will be closed in the next 4-7 days elsewise] |
What this PR fixes
Organization IDs were being displayed instead of organization names
in the Mentors & Contributors table on yearly pages.
Changes made
Related issue
Fixes #85
Testing
/yearly/google-summer-of-code-2016Summary by CodeRabbit
Bug Fixes
Chores
✏️ Tip: You can customize this high-level summary in your review settings.