Skip to content

Commit 5507a8d

Browse files
fix: handle Calendly-style issues and 2-digit year dates in schedule script
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 45b0fb7 commit 5507a8d

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

.github/scripts/update_schedule.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
from the issue assignees, and rewrites the schedule table in README.md.
55
"""
66

7+
from __future__ import annotations
8+
79
import json
810
import os
911
import re
@@ -77,6 +79,10 @@ def parse_date_from_title(title: str) -> str:
7779
m = re.search(r"(\d{1,2}-\d{1,2}-\d{4})", title)
7880
if m:
7981
return m.group(1)
82+
# 2-digit year MM-DD-YY e.g. 06-19-26
83+
m = re.search(r"(\d{1,2}-\d{1,2}-(\d{2}))$", title)
84+
if m and len(m.group(2)) == 2:
85+
return m.group(1)[:-2] + "20" + m.group(2)
8086
# "Month D, YYYY" or "Month DD YYYY"
8187
m = re.search(rf"({_MONTHS})\s+(\d{{1,2}}),?\s+(\d{{4}})", title)
8288
if m:
@@ -119,10 +125,16 @@ def build_row(issue: dict) -> dict | None:
119125

120126
# For manually-created issues the guest name may be in the title
121127
# e.g. "Open Source Friday - Guest Name - MM-DD-YYYY"
128+
if not guest_name:
129+
# First try Calendly-style body: "Name: Angela Wen @handle"
130+
m = re.search(r"Name:\s+(.+?)(?:\s*@\S+)?\s*$", body, re.MULTILINE)
131+
if m:
132+
guest_name = m.group(1).strip()
133+
122134
if not guest_name:
123135
parts = [p.strip() for p in re.split(r"\s+-\s+", title)]
124136
# Remove the leading "Open Source Friday..." segment and trailing date segment
125-
candidates = [p for p in parts[1:] if not re.search(r"\d{4}", p)]
137+
candidates = [p for p in parts[1:] if not re.search(r"\d{4}|\d{2}$", p)]
126138
if candidates:
127139
guest_name = candidates[0]
128140

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ Don't miss this chance to explore the world of Open Source every Friday. We're l
1414
| ---- | ----- | ------- | ---- |
1515
| May 22, 2026 | [Prachi Sethi](https://github.com/githubevents/open-source-friday/issues/216) | OM1 | TBD |
1616
| May 29, 2026 | [elvis kahoro](https://github.com/githubevents/open-source-friday/issues/201) | dlt | TBD |
17+
| June 19, 2026 | [Angela Wen](https://github.com/githubevents/open-source-friday/issues/222) | TBD | Andrea Griffiths |
1718
<!-- SCHEDULE_END -->

0 commit comments

Comments
 (0)