feat(calendar): support resource attendees#881
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 26, 2026, 1:14 AM ET / 05:14 UTC. Summary Reproducibility: not applicable. as a feature PR. Source inspection shows current main lacks Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Next step before merge
Security Review detailsBest possible solution: Land the narrow additive modifier after maintainer review and required CI, keeping room selection and booking policy outside gogcli. Do we have a high-confidence way to reproduce the issue? Not applicable as a feature PR. Source inspection shows current main lacks Is this the best way to solve the issue? Yes. Extending the existing attendee modifier parser is the narrowest maintainable path and avoids adding a parallel flag or raw Calendar API escape hatch. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against dafe80460ffe. Label changesLabel justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Thanks @titus7490! Landed in 52ff465 with resource attendees supported for create and add-attendee updates. Live disposable proof confirmed resource=true after both create and update readback; cleanup succeeded. |
Summary
;resourceas an attendee modifier for Google Calendar eventscalendar create --attendees,calendar update --attendees, andcalendar update --add-attendee;optionaland;comment=...attendee modifiers working alongside itWhy
Google Calendar represents rooms and equipment as event attendees with
resource: true.gogalready exposes high-level Calendar create/update commands and attendee modifiers foroptionalandcomment, but callers could not mark an attendee as a Calendar resource without dropping down to raw API calls.This keeps the high-level CLI useful for generic Workspace room/resource booking while leaving organization-specific room selection, FreeBusy fallback, and acceptance checks outside gogcli.
Compatibility
email,email;optional, andemail;comment=...inputs keep their behavior.;resourceis present.calendar update --add-attendeestill preserves existing attendee metadata and skips duplicate emails; use--attendeeswhen replacing the attendee list is intended.Behavior proof
Dry-run from this branch shows the outgoing Calendar event payload sets
resource: trueand preserves the other attendee modifiers:{ "dry_run": true, "op": "calendar.create", "request": { "event": { "attendees": [ { "comment": "Project room", "email": "room@resource.calendar.google.com", "optional": true, "resource": true } ] } } }Live validation was also done outside this PR with a local Workspace room-booking wrapper using the same Calendar resource-attendee contract:
responseStatus: acceptedcancelledno_rooms_availablefor the occupied slot and did not create a second bookingThe local room-selection wrapper is intentionally not included here; this PR only exposes the generic Google Calendar
EventAttendee.resourcefield in the existing attendee syntax.Tests
go test -vet=off ./internal/cmd -run 'TestParseAttendee|TestMergeAttendees|TestCalendarUpdateCmd_AddAttendee|TestCalendarUpdateBuildPatchResourceAttendee|TestBuildCalendarCreatePlanResourceAttendee'go test -vet=off ./internal/cmdmake docs-commandsmake buildgit diff --check origin/main...HEAD./bin/gog calendar create primary --summary 'Resource attendee dry run' --from 2026-06-26T10:00:00+02:00 --to 2026-06-26T10:30:00+02:00 --attendees 'room@resource.calendar.google.com;resource;optional;comment=Project room' --dry-run --jsongo test -vet=off ./...