Skip to content

Commit a9bafe7

Browse files
ashleywolfCopilot
andcommitted
Fix event parsing, ships component, and dependency updates
- Fix calendar API timezone handling - Fix events API error handling - Fix EventsList rendering edge case - Update Ships component layout - Update commons.json and partner-pack content - Add test coverage for event edge cases - Update dependencies Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 82641df commit a9bafe7

File tree

12 files changed

+715
-27
lines changed

12 files changed

+715
-27
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Repository for the official GitHub Maintainer Month website. You can access the
2020

2121
## Getting Started
2222

23-
Requires [Node.js](https://nodejs.org/) v18.18 or later.
23+
Requires [Node.js](https://nodejs.org/) v20 or later.
2424

2525
### Installation
2626

@@ -58,5 +58,5 @@ Maintainer Month was created, and is maintained, by GitHub, starting in 2021 as
5858

5959
## License
6060

61-
Copyright © 2025 [GitHub](https://github.com/github).<br />
61+
Copyright © 2026 [GitHub](https://github.com/github).<br />
6262
This project is [MIT](LICENSE) licensed.

api/calendar.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function toICSEvent(event) {
2222

2323
const icsEvent = {
2424
title: event.title,
25-
description: event.description || '',
25+
description: event.metaDesc || '',
2626
location: event.location || '',
2727
url: event.linkUrl || '',
2828
calName: 'Maintainer Month 2026',
@@ -63,7 +63,13 @@ function toICSEvent(event) {
6363
endDate.getUTCDate(),
6464
]
6565
} else {
66-
icsEvent.end = [EVENT_YEAR, startMonth, startDay + 1]
66+
// Use Date math to handle month boundary rollover
67+
const endDate = new Date(Date.UTC(EVENT_YEAR, startMonth - 1, startDay + 1))
68+
icsEvent.end = [
69+
endDate.getUTCFullYear(),
70+
endDate.getUTCMonth() + 1,
71+
endDate.getUTCDate(),
72+
]
6773
}
6874
}
6975

api/events.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const isAllDayValue = (value) =>
2323

2424
export const getEvents = (year) => {
2525
const events_path = year ? `content/${year}/events` : 'content/events'
26+
if (!fs.existsSync(events_path)) return []
2627
const eventFiles = fs.readdirSync(events_path)
2728

2829
const events = eventFiles
@@ -144,8 +145,8 @@ const formatEventDateTime = (
144145
const PTStartTime = UTCStartTime.tz('America/Los_Angeles')
145146

146147
formattedStartTime = {
147-
utc: UTCStartTime.format('HH:mm a'),
148-
pt: PTStartTime.format('HH:mm a'),
148+
utc: UTCStartTime.format('h:mm a'),
149+
pt: PTStartTime.format('h:mm a'),
149150
}
150151
hasSpecificStartTime = true
151152
}
@@ -168,8 +169,8 @@ const formatEventDateTime = (
168169
const PTEndTime = UTCEndTime.tz('America/Los_Angeles')
169170

170171
formattedEndTime = {
171-
utc: UTCEndTime.format('HH:mm a'),
172-
pt: PTEndTime.format('HH:mm a'),
172+
utc: UTCEndTime.format('h:mm a'),
173+
pt: PTEndTime.format('h:mm a'),
173174
}
174175
hasSpecificEndTime = true
175176
}

components/events-list/EventsList.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ const EventsList = ({ events }) => {
227227
<p
228228
className="events-list__text"
229229
dangerouslySetInnerHTML={{
230-
__html: md().render(event.description || ''),
230+
__html: md().render(event.metaDesc || ''),
231231
}}
232232
/>
233233
</div>

components/header/Header.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import GitHubLogo from '../../public/icons/github-logo'
1111
import IconCalendar from '../../public/icons/calendar'
1212
import IconBooks from '../../public/icons/books'
1313
import BoxGift from '../../public/icons/box-gift'
14-
import IconShield from '../../public/icons/shield'
1514
import Rocket from '../../public/icons/rocket'
1615
import { BREAKPOINTS } from '../../common/constants'
1716

components/ships/Ships.jsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Chip from '../chip/Chip'
2+
import { getLiteral } from '../../common/i18n'
23

34
const formatDate = (dateString) => {
45
const date = new Date(dateString + 'T00:00:00')
@@ -14,7 +15,7 @@ const Ships = ({ ships }) => {
1415
return (
1516
<section className="ships">
1617
<p className="ships__empty">
17-
No ships listed yet. Check back soon!
18+
{getLiteral('ships:empty')}
1819
</p>
1920
</section>
2021
)
@@ -27,8 +28,8 @@ const Ships = ({ ships }) => {
2728
return (
2829
<section className="ships">
2930
<div className="ships__intro">
30-
<h2 className="ships__heading">Recent ships for maintainers</h2>
31-
<p className="ships__subtitle">GitHub features and updates that make maintaining open source projects easier. Shipped recently or coming soon.</p>
31+
<h2 className="ships__heading">{getLiteral('ships:title')}</h2>
32+
<p className="ships__subtitle">{getLiteral('ships:description')}</p>
3233
</div>
3334
<div className="ships__grid">
3435
{sorted.map((ship) => (

content/commons.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"hero:image-description": "Illustration by Ariel Davis, of a surreal geometric assortment of hands and shapes implying collaboration",
5151

5252
"library:title": "Library",
53-
"library:description": "List of all maintainer resources and storiesh.",
53+
"library:description": "List of all maintainer resources and stories.",
5454

5555
"meta:title": "Maintainer Month 2026",
5656
"meta:description": "A month for open source maintainers to gather, share, and be celebrated.",

content/partner-pack/offers/jsconf.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: "JSConf North America"
33
logo: "jsconf.png"
44
headline: "Unlock early bird pricing for JSConf North America 2026!"
55
description: "Maintainers can access a special discounted ticket rate — available in limited quantities for Maintainer Month."
6-
secondaryCta: "Use code: JSCONF25GITMAIN"
6+
secondaryCta: "Use code: JSCONF26GITMAIN"
77
ctaText: "Learn more"
88
ctaLink: "https://events.linuxfoundation.org/jsconf-north-america/"
99
---

0 commit comments

Comments
 (0)