[Programs] Fix Hacktoberfest card linking to /programs/null on /careers/internships - #8056
Voyagerroc-Lab wants to merge 1 commit into
Conversation
The Hacktoberfest 2023 "Prep" entry (src/collections/programs/hacktoberfest-2023/index.mdx) omitted the programSlug frontmatter field. The careers programs grid (src/sections/Careers/Careers-Programs-grid/index.js) sorts programs by archived (ASC) then title (DESC) and de-duplicates by the program name, so this entry sorted ahead of the other "Hacktoberfest" entries and won the de-duplication. Its null programSlug produced an invalid /programs/null link for the Hacktoberfest card on /careers/internships. Adding programSlug: hacktoberfest (matching the sibling hacktoberfest-* entries) makes the card resolve to /programs/hacktoberfest. Fixes layer5io#8050 Signed-off-by: Erol Tasci <tascierol32@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe Hacktoberfest event metadata now includes ChangesHacktoberfest program metadata
Priority: ➖ Normal Estimated code review effort: 1 (Trivial) | ~2 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The Hacktoberfest card should now resolve to the intended program URL without introducing runtime or deployment risk. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Description
This PR fixes #8050.
On https://layer5.io/careers/internships the Hacktoberfest program card linked to
https://layer5.io/programs/nullinstead of a valid URL.Root cause
src/collections/programs/hacktoberfest-2023/index.mdx(the "Hacktoberfest Prep 2023 ..." entry) was missing theprogramSlugfrontmatter field.The careers programs grid (
src/sections/Careers/Careers-Programs-grid/index.js) queries allprogramscollection entries, sorts them byarchived(ASC) thentitle(DESC), and de-duplicates by theprogramname. Becausetitleis sorted descending,"Hacktoberfest Prep 2023: ..."sorts ahead of"Hacktoberfest 2025","Hacktoberfest 2024", etc., so this entry won the de-duplication for theHacktoberfestprogram. Its absentprogramSlugis returned by Gatsby's GraphQL layer asnull, and the card link is built as`/programs/${frontmatter.programSlug}`→/programs/null.Change
Added the missing field, matching the pattern already used by every sibling Hacktoberfest entry (
hacktoberfest-2020…hacktoberfest-2025):program: "Hacktoberfest" +programSlug: "hacktoberfest" date: 2023-09-29Notes for Reviewers — Verification
archivedASC +titleDESC, de-dupe byprogram, link`/programs/${programSlug}`) against the working tree vs.HEAD:hacktoberfest-2023) →programSlug = null→/programs/nullhacktoberfest-2023) →programSlug = "hacktoberfest"→/programs/hacktoberfestsca-contributhon,mlh,gsoc,gsod,communitybridge, and theLayer5entry which intentionally uses its own page slug).npx eslint .withNODE_ENV=test, per the repo's lint note): the changed file is.mdxfrontmatter and is not covered by the ESLint config, and ESLint reports no changes vs. baseline.gatsby buildcould not be completed in my environment becausesharpfails to compile without a Visual Studio C++ toolchain (node-gyp: Could not find any Visual Studio installation). This is an environment limitation only; the PR preview build will exercise the full Gatsby data layer.Scope: single line, one file, no logic/component changes.
Signed commits
Summary by CodeRabbit