Skip to content

Add PowerShell Community Call to the calendar - #635

Merged
HeyItsGilbert merged 12 commits into
mainfrom
community-call-calendar
Nov 20, 2026
Merged

HeyItsGilbert merged 12 commits into
mainfrom
community-call-calendar

Conversation

@HeyItsGilbert

Copy link
Copy Markdown
Member

Summary

  • Adds the PowerShell team's monthly Community Call (3rd Thursday, 9:30 AM Pacific) to content/calendar/.
  • .github/scripts/sync-community-call.mjs computes the next 3 occurrences (DST-aware) and, via GitHub's Discussions GraphQL API, links the latest matching agenda thread from PowerShell/PowerShell's Community Call category as discussionUrl when its month lines up with a generated occurrence.
  • .github/workflows/community-call-sync.yml runs the script daily via workflow_dispatch/cron and opens a bot PR, mirroring the existing meetup-sync/podcast-sync automation.
  • calendar.html renders an "Agenda discussion" link on the event card when discussionUrl is present.
  • Seeded the first three generated calendar entries so the feature is visible immediately.

Design notes

  • The occurrence date is always computed from the known 3rd-Thursday/9:30am-Pacific rule (matching the team's own recurring ICS), never parsed from a discussion title — titles are inconsistent ("October Community Call" vs. "August 21 2025 Community Call"). An explicit day+year in a title overrides the computed date only when present (handles holiday reschedules).
  • The discussions category occasionally contains unrelated threads; filtering on /community call/i in the title reliably excluded all observed noise during investigation.
  • The script never deletes calendar files — occurrences that fall off the 3-month horizon are simply left as historical records, same as meetup-sync.

Testing

  • node --test .github/scripts/sync-community-call.test.mjs — 11 new tests (date math, DST handling, title parsing, sync planning).
  • node --test .github/scripts/sync-meetup-events.test.mjs — unaffected, still passing.
  • Dry-run against the live GitHub API confirmed correct date computation and discussion matching.
  • Hugo wasn't available in the dev sandbox to render calendar.html locally — this PR/Netlify build is the first real render check for that template change.

- New .github/scripts/sync-community-call.mjs computes the next 3 monthly
  occurrences (3rd Thursday, 9:30 AM Pacific, DST-aware) and links the latest
  matching agenda discussion from PowerShell/PowerShell's Community Call
  GitHub Discussions category, with unit tests.
- New .github/workflows/community-call-sync.yml runs it daily and opens a bot PR,
  mirroring the existing meetup-sync/podcast-sync automation pattern.
- Render an "Agenda discussion" link on calendar cards when discussionUrl is set.
- Seed the first three generated events.
- Initial output of .github/scripts/sync-community-call.mjs for the next
  3 monthly occurrences, as the daily sync workflow will keep producing.
Copilot AI balanced review requested due to automatic review settings November 19, 2026 20:33
@netlify

netlify Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for powershellorg ready!

Name Link
🔨 Latest commit 35558c4
🔍 Latest deploy log https://app.netlify.com/projects/powershellorg/deploys/6affc8bc27e5e09b9572ee51
😎 Deploy Preview https://deploy-preview-635--powershellorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 96 (no change from production)
Accessibility: 95 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

- upcomingOccurrences always started at the current UTC month, so running the
  sync after today's call had ended still counted it toward the 3-occurrence
  window, leaving only 2 truly upcoming calls.
- Now skips (without consuming a slot) any occurrence whose endDate is already
  past `from`, with regression tests for both sides of that boundary.
- Wire sync-community-call.test.mjs into build.yml, next to the meetup test,
  so CI actually runs it.
- Regenerate the seed calendar files with the corrected window.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Critical sync defects can overwrite historical content, revert resolved event dates and agenda links, and generate November–December 2026 calls despite the last-call-of-the-year announcement.

3 open issues
What changed in this PR

Adds PowerShell Community Call events to the site’s calendar and subscription feed, with automated scheduling and links to agenda discussions.

Changes:

  • Generates three months of events with Pacific daylight-saving handling and discussion-based date overrides.
  • Adds a daily and manually triggered workflow that opens synchronization PRs.
  • Seeds initial events, displays agenda links on calendar cards, and adds synchronization tests.
File Description
themes/​powershell-community/​layouts/​_default/​calendar.html Displays agenda links when available.
content/​calendar/​community-call-2027-01.md Seeds the January 2027 event.
content/​calendar/​community-call-2026-12.md Seeds the December 2026 event.
content/​calendar/​community-call-2026-11.md Seeds the November 2026 event.
.github/​workflows/​community-call-sync.yml Runs synchronization and opens update PRs.
.github/​scripts/​sync-community-call.test.mjs Tests scheduling, date conversion, agenda matching, and sync planning.
.github/​scripts/​sync-community-call.mjs Computes event dates, fetches agendas, and writes calendar entries.

Review effort: Balanced

Comment thread .github/scripts/sync-community-call.mjs Resolved
Comment thread .github/scripts/sync-community-call.mjs Resolved
Comment thread .github/scripts/sync-community-call.mjs Resolved
Copilot AI balanced review requested due to automatic review settings November 19, 2026 20:38
- New cancelled/cancelledReason frontmatter fields, usable by any calendar entry.
- sync-community-call.mjs treats a cancelled managed file as frozen: the daily
  sync never overwrites its date or un-cancels it (isCancelled, with tests).
- calendar.html shows a muted "Cancelled" card (upcoming) or badge (past)
  instead of a join CTA.
- event.ics now emits STATUS:CANCELLED for cancelled events.
- Mark November and December 2026's PowerShell Community Call cancelled for
  the holidays.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Agenda matching ignores explicit years, allowing stale discussions to replace upcoming calls and overwrite historical entries, while reschedule handling can discard or reset valid updates.

4 open issues
1 previously missed issue

In code that hasn't changed since last review

Medium severity Preserve other months’ reschedules when updating an agenda

.github/​scripts/​sync-community-call.mjs:141

When a new month's agenda becomes the latest discussion, this loop overwrites every in-horizon file using defaults for the other months. For example, publishing December's agenda on November 18 resets a previously rescheduled November 30 call to November 19 and removes its agenda link. Fetch and apply an agenda for each month, or preserve each managed file's resolved date and link unless an authoritative update for that month is available.

Review effort: Balanced

Comment thread .github/scripts/sync-community-call.mjs Resolved
Copilot AI balanced review requested due to automatic review settings November 19, 2026 20:43
- event.ics: my earlier edit replaced the "color" dict entry instead of adding
  "status" alongside it, silently dropping COLOR:7C3AED from every calendar
  event. Restored it.
- Verified with a real `hugo` build (not available in the earlier sandbox) that
  `cond .Params.cancelled "CANCELLED" "CONFIRMED"` does not crash the ICS
  template on events without the field (Hugo treats nil as falsy here) and
  that STATUS/COLOR render correctly for both cancelled and normal events.
- Regenerated assets/css/tailwind.css for the new cancelled-state utility
  classes (line-through, bg-red-100, opacity-75, etc.), which CI's
  'Verify generated assets are up to date' check correctly caught as stale.
- Output of npm run build:css after the calendar.html cancelled-state classes.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The sync can match stale agendas across years and overwrite historical event files, omit upcoming rescheduled calls, and trigger committed-assets check failures when cancellation styling changes with the date.

5 open issues
1 file not reviewed
  • assets/css/tailwind.css: Generated file

Review effort: Balanced

- Match a discussion's explicit year against the target occurrence's year;
  a stale same-named thread from a past year could otherwise overwrite a
  historical calendar file (e.g. a 2025 thread writing community-call-2025-11.md
  while leaving the real 2026 occurrence unsynchronized).
- Resolve each month's agenda link independently against all recent
  discussions, instead of only ever applying the single globally-latest
  discussion. A resolved reschedule for one month no longer gets reverted
  when a newer discussion is published for a different month.
- Bound how far before an occurrence's default date a month-only title
  (no year, e.g. "January Community Call") may have been created, so a
  same-named thread from a year ago can't match next year's occurrence.
- Generate candidate occurrences, apply agenda overrides, then filter to
  the next 3 upcoming (previously filtered first) — a reschedule that
  moves an already-elapsed default date into the future is no longer
  dropped before the override is even considered.
- Safelist the Tailwind classes unique to the cancelled-event UI branches
  (bg-gray-400, line-through, text-red-700, px-1.5, py-0.5, align-middle)
  so the committed-assets CI check doesn't flip based on which day it runs.
- 5 new regression tests for the above; 24 total, all passing. Verified
  live against the real GitHub API and a real `hugo` production build.
Copilot AI balanced review requested due to automatic review settings November 20, 2026 03:38
- candidateOccurrences(1, Date.UTC(2026, 11, 1)) generates December 2026
  (month index 11), not January 2027, so the test's January-titled discussion
  was excluded by month mismatch alone and never reached the 300-day lead-time
  check it was meant to cover — a false-positive pass.
- Target the January 2027 occurrence directly (from = 2027-01-01) with a
  sanity assertion on monthIndex, and verified by hand that the lead (374
  days) is what the bound actually rejects.
- Re-verified live against the real GitHub API: sync still reports
  "already synchronized", confirming the production matching logic was
  already correct and only the test needed fixing.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unresolved issues prevent automatic merging of Community Call updates, will fail generated-assets checks when agenda links appear, and leave cancelled-date text below required contrast thresholds.

3 open issues
5 resolved since last review
1 file not reviewed
  • assets/css/tailwind.css: Generated file

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 20, 2026 03:44
- calendar.html: use the already-shipped hover:text-purple-700 instead of
  hover:text-purple-800 for the agenda-discussion link, and bg-gray-800
  instead of bg-gray-400 for the cancelled date block (meets WCAG 3:1/4.5:1
  contrast after the card's opacity-75 is applied; the old gray-400 measured
  ~1.95:1/1.84:1). Both classes are already used unconditionally elsewhere
  in the theme, so no date- or content-dependent PurgeCSS risk either.
- purgecss.config.cjs: drop the now-dead bg-gray-400 safelist entry.
- merge-automation-prs.yml: add automation/sync-community-call to the
  verified-merge branch allowlist, matching the other three sync workflows
  — otherwise its bot PRs would sit unmerged forever.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Human assessment is needed because unpublished findings identify a build-blocking ICS rendering failure and rescheduling logic that can leave incorrect calendar dates published.

No open issues 🎉

3 resolved since last review
1 file not reviewed
  • assets/css/tailwind.css: Generated file

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 20, 2026 03:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Cancelled-event styling reduces text contrast below accessibility minimums, and the synchronizer ends community calls 30 minutes early, requiring fixes to styling, event times, seeded dates, and test expectations.

2 open issues
1 file not reviewed
  • assets/css/tailwind.css: Generated file

Review effort: Balanced

Comment thread .github/scripts/sync-community-call.mjs Resolved
- sync-community-call.mjs/tests/seeded content: the authoritative recurring
  ICS (PowerShell-RFC/CommunityCall/PSTeamsCall.ics) has DTEND 10:30 Pacific,
  not 10:00 as previously assumed — fixed both the default-occurrence and
  explicit-date-override end times, updated tests, and corrected all four
  seeded calendar files (including the two frozen cancelled ones, which the
  sync itself will never touch again).
- calendar.html: removed the card-wide opacity-75 on cancelled events — it
  was dragging the title/reason/meta text contrast to ~2.9:1/3.9:1/2.9:1,
  below the 3:1/4.5:1 WCAG minimums. The dark date block, strikethrough
  title, and red 'Cancelled' badge already distinguish cancelled events
  without needing to dim the rest of the card.
- Verified: 24 tests pass, a real hugo production build + ICS validation
  show DTEND at 18:30Z for every occurrence, and a live dry-run against the
  real GitHub API still reports "already synchronized".
Copilot AI balanced review requested due to automatic review settings November 20, 2026 04:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Human assessment is needed because a critical finding omitted from the published review indicates that missing cancelled values break calendar generation and the Hugo build.

No open issues 🎉

2 resolved since last review
1 file not reviewed
  • assets/css/tailwind.css: Generated file

Review effort: Balanced

@HeyItsGilbert
HeyItsGilbert merged commit e8c76ae into main Nov 20, 2026
6 checks passed
@HeyItsGilbert
HeyItsGilbert deleted the community-call-calendar branch November 20, 2026 04:28
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.

2 participants