Skip to content

Sync launches into native Google Calendars - #6

Merged
roma321m merged 1 commit into
mainfrom
feat/google-sync
Oct 1, 2026
Merged

roma321m merged 1 commit into
mainfrom
feat/google-sync

Conversation

@roma321m

@roma321m roma321m commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

What

  • npm run sync: writes the same events as the ICS feeds into the 4 public Google Calendars via a service account (RS256 JWT with node:crypto, plain fetch, no new dependency). Diff by launch id + content hash stored in private extended properties: insert, update in place, delete; events before the snapshot window are kept as history; events not written by launchcal are never touched.
  • --dry-run and --calendar <id>=<googleCalendarId> for testing.
  • publish.yml: new sync job after build, using the snapshot artifact, in the google-calendar environment (deployable from main only, holds GOOGLE_SERVICE_ACCOUNT_KEY). A sync failure does not block the Pages deploy.

Why
Google refreshes subscribed ICS feeds only every 12-24h; native calendars update within one 2h run.

Verification

  • 57 tests green, typecheck clean. Planner, hash, JWT and listEvents assertions mutation-checked (all mutants killed). Independent review findings fixed or noted.
  • Live on a test calendar: 14 inserts matching all.ics (times, all-day tentative, free, text); re-run 0 changes; a time change updated the same Google event id; a removed launch was deleted; restore re-synced, then 0 changes.
  • Dry run against the 4 real calendars: 14 / 1 / 1 / 10 inserts, equal to the ICS feeds. Nothing written to them yet; the first real write happens on the publish run after merge.

🤖 Generated with Claude Code

Google refreshes subscribed ICS feeds only every 12-24h. A service
account now writes the same events into native public calendars every
publish run, diffed by launch id and a content hash, so changes show up
within one run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@roma321m
roma321m merged commit 6448de6 into main Oct 1, 2026
1 check passed
@roma321m
roma321m deleted the feat/google-sync branch October 1, 2026 15:11
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.

1 participant