Skip to content

fix: replace organization IDs with names in mentors table (#85)#87

Open
Rishabhpal07 wants to merge 1 commit into
ketankauntia:masterfrom
Rishabhpal07:fix/numbers_showing_instead_of_org_names
Open

fix: replace organization IDs with names in mentors table (#85)#87
Rishabhpal07 wants to merge 1 commit into
ketankauntia:masterfrom
Rishabhpal07:fix/numbers_showing_instead_of_org_names

Conversation

@Rishabhpal07
Copy link
Copy Markdown

@Rishabhpal07 Rishabhpal07 commented Jan 27, 2026

What this PR fixes

Organization IDs were being displayed instead of organization names
in the Mentors & Contributors table on yearly pages.

Changes made

  • Fixed organization name mapping logic
  • Ensured correct fallback values

Related issue

Fixes #85

Testing

  • Tested locally on /yearly/google-summer-of-code-2016

Summary by CodeRabbit

  • Bug Fixes

    • Improved organization name display in the yearly contributors table to show project titles as fallback when organization information is unavailable.
  • Chores

    • Updated .gitignore configuration.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 27, 2026

@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.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 27, 2026

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: Expected 'de' | 'de-DE' | 'de-AT' | 'de-CH' | 'en' | 'en-US' | 'en-AU' | 'en-GB' | 'en-CA' | 'en-NZ' | 'en-ZA' | 'es' | 'es-AR' | 'fr' | 'fr-CA' | 'fr-CH' | 'fr-BE' | 'nl' | 'nl-BE' | 'pt-AO' | 'pt' | 'pt-BR' | 'pt-MZ' | 'pt-PT' | 'ar' | 'ast-ES' | 'ast' | 'be-BY' | 'be' | 'br-FR' | 'br' | 'ca-ES' | 'ca' | 'ca-ES-valencia' | 'ca-ES-balear' | 'da-DK' | 'da' | 'de-DE-x-simple-language' | 'el-GR' | 'el' | 'eo' | 'fa' | 'ga-IE' | 'ga' | 'gl-ES' | 'gl' | 'it' | 'ja-JP' | 'ja' | 'km-KH' | 'km' | 'ko-KR' | 'ko' | 'pl-PL' | 'pl' | 'ro-RO' | 'ro' | 'ru-RU' | 'ru' | 'sk-SK' | 'sk' | 'sl-SI' | 'sl' | 'sv' | 'ta-IN' | 'ta' | 'tl-PH' | 'tl' | 'tr' | 'uk-UA' | 'uk' | 'zh-CN' | 'zh' | 'crh-UA' | 'crh' | 'cs-CZ' | 'cs' | 'nb' | 'no' | 'nl-NL' | 'de-DE-x-simple-language-DE' | 'es-ES' | 'it-IT' | 'fa-IR' | 'sv-SE' | 'de-LU' | 'fr-FR' | 'bg-BG' | 'bg' | 'he-IL' | 'he' | 'hi-IN' | 'hi' | 'vi-VN' | 'vi' | 'th-TH' | 'th' | 'bn-BD' | 'bn', received object at "language"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Walkthrough

Two files modified to address a display issue where organization names appeared as numbers in the yearly page, and to add environment file to gitignore. The org_name field resolution was changed from using org_slug to using the project title as fallback.

Changes

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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.title displays a project title as the organization name when the org lookup fails. Since ProjectSnapshot lacks an org_name field, use "Unknown organization" or the org_slug instead to avoid mislabeling in the MentorsContributorsTable display 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] : []
+                }))} 

@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
gsoc-orgs Ready Ready Preview, Comment Jan 27, 2026 3:38pm

Copy link
Copy Markdown
Owner

@ketankauntia ketankauntia left a comment

Choose a reason for hiding this comment

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

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.

@Rishabhpal07
Copy link
Copy Markdown
Author

You’re right-
I misinterpreted the issue
I’ll recheck the data flow thoroughly, fix the mapping correctly, and update the PR
I’ll also attach screenshots once the UI change is verified to make review easier

@ketankauntia
Copy link
Copy Markdown
Owner

@Rishabhpal07 are you working on this? [will be closed in the next 4-7 days elsewise]

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.

numbers showing instead of org names

2 participants