Commit Graph

467 Commits

Author SHA1 Message Date
doodaaatimmy-creator
6489dd9fe3 fix(gmail): decode mime-type charset fallback 2026-03-07 17:51:02 +00:00
Peter Steinberger
5ca86b1526 test(calendar): harden subscribe coverage 2026-03-07 16:59:58 +00:00
Peter Steinberger
b15ccd4166 feat(calendar): add subscribe command (#327) (thanks @cdthompson) 2026-03-07 16:55:08 +00:00
Christopher D Thompson
d8650ad908
feat(calendar): add subscribe command for calendarList.insert API (#327)
Add new `calendar subscribe` command to add an existing calendar to the
user's calendar list. Supports optional flags for color, hidden state,
and selection state.

Aliases: sub, add-calendar

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-07 16:54:57 +00:00
Peter Steinberger
abed3d8ad9 fix(calendar): hide cancelled events in list output (#362) (thanks @sharukh010) 2026-03-07 16:52:53 +00:00
Pathan Sharukh Khan
d2acfa48ac
Fix/filter cancelled events (#362)
* fix: filter cancelled events from calendar list by default

* fix(contacts): fix bool/string type mismatch in apply helpers.
2026-03-07 16:52:43 +00:00
Peter Steinberger
845cb7f9b7 fix(contacts): send required other-contact copy mask (#384) (thanks @rbansal42) 2026-03-07 16:50:08 +00:00
Rahul Bansal
1dffd30af8
fix: populate CopyMask in contacts other delete to fix 400 error (#384)
The deleteOtherContact function called CopyOtherContactToMyContactsGroup
with an empty CopyOtherContactToMyContactsGroupRequest{}, but the Google
People API requires the CopyMask field to specify which fields to copy.
Omitting it causes a 400 badRequest error: 'copyMask is required'.

Fix by setting CopyMask to include all relevant contact fields.

Fixes #383

Co-authored-by: Rahul Bansal <rahul@hudle.in>
2026-03-07 16:49:59 +00:00
Peter Steinberger
484faeae30 fix(auth): isolate Keep service account fallback (#414) (thanks @jgwesterlund) 2026-03-07 16:48:19 +00:00
John Westerlund
fae24e3b1d
fix(auth): restrict Keep service account to Keep API calls only (#414)
When a Keep-specific service account file (keep-sa-*.json) exists,
tokenSourceForServiceAccountScopes falls back to it for all API calls,
not just Keep. This causes 401 errors on Calendar, Gmail, Drive, and
other services that should use OAuth.

Only use keep-sa and legacy Keep SA files when serviceLabel is "keep",
allowing other services to fall through to OAuth authentication.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 16:47:39 +00:00
Peter Steinberger
8036c597a1 fix(googleapi): scope timeout landing cleanup (#425) (thanks @laihenyi) 2026-03-07 16:44:51 +00:00
laihenyi
449beff88b
fix(googleapi): replace Client.Timeout with transport-level ResponseHeaderTimeout (#425)
* feat(drive): include shortcutDetails in drive get fields

Add shortcutDetails to the Drive Get API fields to enable resolving
shortcut target file IDs and MIME types.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(googleapi): replace Client.Timeout with transport-level ResponseHeaderTimeout

The global http.Client.Timeout (30s) applied to the entire request
lifecycle, causing large Drive file downloads (videos, backups, etc.)
to time out. Replace it with http.Transport.ResponseHeaderTimeout
which only limits the time waiting for the server to begin responding.
Once response headers arrive and the body starts streaming, there is
no hard cap — large transfers complete naturally.

- Set ResponseHeaderTimeout=30s on the base transport
- Remove http.Client.Timeout from the API client
- Keep a dedicated tokenExchangeTimeout=30s for OAuth2 token refreshes
- Add tests verifying the new transport configuration

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 16:44:37 +00:00
Peter Steinberger
0287bf3b9d fix: land sheets create parent move semantics (#424) (thanks @ManManavadaria) 2026-03-07 15:32:19 +00:00
Man Manavadaria
56398222f1
sheets create: add --parent flag and move spreadsheet to parent folder using Drive service (#424) 2026-03-07 15:31:47 +00:00
Peter Steinberger
6fa8b66941 fix(ci): satisfy nilnil lint in watch serve test 2026-03-07 15:01:27 +00:00
Chrys Bader
2ee9860712
fix(gmail): preserve --client in watch serve push handler contexts (#411)
Ensure gmail watch serve re-applies the selected OAuth client to request-time contexts before creating Gmail services, so push handling does not fall back to client default in multi-client setups.
2026-03-07 14:59:29 +00:00
salmonumbrella
4abcd03da7
fix(gmail): allow Workspace native aliases with empty verification status (#407)
* fix(gmail): allow workspace native aliases for --from

* fix: land Workspace alias send fix and changelog (#407) (thanks @salmonumbrella)

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-03-07 14:56:25 +00:00
salmonumbrella
caf38a3d33
fix(gmail-watch): delay history fetch in watch serve (#397)
* fix(gmail-watch): delay history fetch in watch serve

* fix: land gmail watch fetch delay and changelog (#397) (thanks @salmonumbrella)

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-03-07 14:54:54 +00:00
Viz
4b1d1d429d
fix: embed IANA timezone database for Windows support (#388)
- Import time/tzdata in cmd/gog/main.go to bundle the IANA tz database
  into the binary (~450KB), fixing time.LoadLocation on Windows
- Add tzdata_test.go verifying LoadLocation works for representative zones
- Add windows-latest CI job running the full gate (fmt, lint, test, build)
2026-03-07 14:53:06 +00:00
Peter Steinberger
0ed89978d3 fix(sheets): cover rich-text hyperlinks in links command (#374) (thanks @omothm) 2026-03-03 05:25:56 +00:00
Omar Othman
ddc1a232e0 feat(sheets): add links command to retrieve cell hyperlinks
Add `gog sheets links` (alias: hyperlinks) command that retrieves
hyperlinks embedded in cells via spreadsheets.get with IncludeGridData.
Mirrors the existing `notes` command pattern using the CellData.Hyperlink field.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-03 05:25:56 +00:00
Steven Truong
14af8f2604 feat(drive): add --all flag to ls for global file listing 2026-03-03 05:06:17 +00:00
Peter Steinberger
e909bc8aad fix: honor dry-run for gmail bulk shortcuts (#385) (thanks @yeager) 2026-03-03 04:33:41 +00:00
Daniel Nylander
74d8089a15 feat(gmail): add archive, read, unread, trash convenience commands
New top-level Gmail commands for common label operations:

- `gog gmail archive` — remove INBOX label (archive)
- `gog gmail read` — remove UNREAD label (mark as read)
- `gog gmail unread` — add UNREAD label (mark as unread)
- `gog gmail trash` — add TRASH + remove INBOX label

All commands support:
- Message IDs as positional args: `gog gmail archive ID1 ID2`
- Query-based bulk ops: `gog gmail archive -q 'is:unread older_than:7d'`
- `--max` to limit query results (default 100)
- JSON output with `--json`
- Automatic batching (1000 per request, Gmail API limit)

These wrap the existing `gog gmail batch modify` with ergonomic
shortcuts for the most common Gmail operations.
2026-03-03 04:33:41 +00:00
Peter Steinberger
7abf494408 fix(ci): clear pre-existing lint baseline and docs updates 2026-03-03 04:06:29 +00:00
salmonumbrella
59fb51276f fix(auth): resolve main rebase fallout 2026-03-03 03:58:53 +00:00
salmonumbrella
6eab7fd95a fix(lint): add blank lines for wsl_v5 linter
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 03:58:53 +00:00
salmonumbrella
25040fe7fe fix(auth): add readonly gmail and drive scope handling 2026-03-03 03:58:53 +00:00
Peter Steinberger
ce9a89adfe fix(gmail): harden draft quote thread fallback (#394) (thanks @salmonumbrella) 2026-03-03 03:37:05 +00:00
salmonumbrella
5234214de3 feat(gmail): add --quote support to draft replies 2026-03-03 03:37:05 +00:00
Peter Steinberger
c2e7754a35 fix(cmd): repair rebase fallout in docs, time, and drive tests 2026-03-03 03:27:32 +00:00
Peter Steinberger
8b9f8316ab build(deps): update go, worker, and toolchain pins 2026-03-03 03:27:30 +00:00
salmonumbrella
b341ac1f78 docs(drive): add comment explaining shared drives query params
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 03:04:43 +00:00
salmonumbrella
427801d95c test(calendar): add test for --to monday end-of-day expansion
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 03:04:43 +00:00
salmonumbrella
65c33c8ef4 test(calendar): add tests for --to tomorrow and --to now
Add integration tests verifying isDayExpr() integration:
- TestResolveTimeRangeWithDefaultsToTomorrowEndOfDay: verifies
  --to tomorrow expands to end-of-day (23:59:59.999999999)
- TestResolveTimeRangeWithDefaultsToNowNoExpansion: verifies
  --to now does NOT expand to end-of-day (remains current time)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 03:04:43 +00:00
salmonumbrella
1b44490a24 test(calendar): add unit tests for isDayExpr function
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 03:04:43 +00:00
salmonumbrella
8955d73482 fix(drive): include all drives in ls 2026-03-03 03:04:43 +00:00
salmonumbrella
c8f16ebd4c fix(calendar): expand date-only --to 2026-03-03 03:04:43 +00:00
salmonumbrella
88fba24f05 fix(drive): include shared drives in search 2026-03-03 03:04:43 +00:00
salmonumbrella
2459923d28 fix: address linter issues in docs/drive commands
- Fix variable shadowing in DocsUpdateCmd (govet: shadow)
- Extract formatAuto constant to satisfy goconst linter

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 03:04:43 +00:00
salmonumbrella
f05a11c662 fix(drive): validate download formats 2026-03-03 03:04:43 +00:00
salmonumbrella
a5de5491ea fix(lint): resolve goconst and shadow lint errors
- Add boolTrue/boolFalse constants for string "true"/"false" values
- Rename shadowed err variable to writeErr in test file

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 03:04:43 +00:00
salmonumbrella
725d176143 docs(drive): add comment explaining shared drives query params
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 03:04:43 +00:00
salmonumbrella
4da63c9037 test(calendar): add test for --to monday end-of-day expansion
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 03:04:43 +00:00
salmonumbrella
9fea0341a1 test(calendar): add tests for --to tomorrow and --to now
Add integration tests verifying isDayExpr() integration:
- TestResolveTimeRangeWithDefaultsToTomorrowEndOfDay: verifies
  --to tomorrow expands to end-of-day (23:59:59.999999999)
- TestResolveTimeRangeWithDefaultsToNowNoExpansion: verifies
  --to now does NOT expand to end-of-day (remains current time)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 03:04:43 +00:00
salmonumbrella
e4d303f143 test(calendar): add unit tests for isDayExpr function
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 03:04:43 +00:00
salmonumbrella
2888f991e1 fix(drive): include all drives in ls 2026-03-03 03:04:43 +00:00
salmonumbrella
7e6ee3f1ba fix(calendar): expand date-only --to 2026-03-03 03:04:43 +00:00
salmonumbrella
b4d0bf9780 fix(docs): clarify update command help text
Distinguish the update command from write by specifying it inserts
text at a specific index position in the document.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 03:04:43 +00:00
salmonumbrella
10cafc986b test(docs): add invalid index validation tests for DocsUpdateCmd
Test that --index flag properly rejects zero and negative values
with the expected error message.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 03:04:32 +00:00