feat(gmail): add signature support to send command#183
Open
salmonumbrella wants to merge 48 commits intosteipete:mainfrom
Open
feat(gmail): add signature support to send command#183salmonumbrella wants to merge 48 commits intosteipete:mainfrom
salmonumbrella wants to merge 48 commits intosteipete:mainfrom
Conversation
The commit 5137fcb added --history-types flag but changed the default behavior: when not specified, it now fetched ALL history types instead of just messageAdded (the previous hardcoded behavior). This fix ensures backward compatibility by defaulting to messageAdded when --history-types is not provided. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When messageDeleted history type is requested, deleted messages cannot be fetched from Gmail API (returns 404). Now collectHistoryMessageIDs returns a struct with separate FetchIDs and DeletedIDs lists, and the hook payload includes deletedMessageIds field for consumers. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add canonical forms to history type alias map for robustness - Add length assertion for FetchIDs in TestCollectHistoryMessageIDs - Clarify documentation that default is messageAdded - Add test for empty input edge case in parseHistoryTypes - Extract duplicate state update logic into updateStateAfterHistory helper Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Rename inner `err` to `updateErr` to avoid shadowing the outer variable, satisfying golangci-lint's govet shadow checker. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Rename inner `err` to `updateErr` in two additional store.Update() calls to avoid shadowing outer variables, completing the fix from commit 71714ae. Both locations now match the established pattern. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace custom contains() helper with Go's built-in strings.Contains() - Add TestProcess_ReadFromStdin to test stdin input via "-" path - All 47 tests pass successfully Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add special character constant with 20+ unique characters - Guarantee at least one special character in generated passwords - Meet typical organizational password policies requiring uppercase, lowercase, digit, and special character - Ensures passwords pass NIST and common security standards
…ting Add --dry-run flag to batch.go and csv.go that shows which commands would be executed without actually running them. This is important for bulk operations to safely preview before execution. - batch.go: Added DryRun field to BatchCmd, implements preview with "[dry-run] line N: cmd arg1 arg2 ..." format - csv.go: Added DryRun field to CSVCmd, implements preview with "[dry-run] row N: cmd arg1 arg2 ..." format - csv_test.go: Added TestBatchCmdDryRun and TestCSVCmdDryRun tests to verify dry-run mode prevents command execution Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace hardcoded cloudIdentityDefaultParent constant with a function that checks for the GOG_CUSTOMER_ID environment variable. If set, uses "customers/{value}" as the parent; otherwise falls back to "customers/my_customer". Update help text for --parent flags to document this new env var override.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Previously, Clear() and Update() calls hardcoded "Sheet1" range regardless of the actual first sheet name in the spreadsheet. This could cause failures when the first sheet had a different name. Changes: - When creating new spreadsheets, explicitly set the first sheet title to "Data" - When updating existing spreadsheets, fetch the first sheet name from metadata - Use the actual sheet name (stored in sheetName variable) in Clear() and Update() calls This ensures the code works with spreadsheets that have any first sheet name, not just "Sheet1". Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- cloudidentity.go: Add CEL expression example to --dynamic-query help - csv.go: Add field substitution and regex pattern examples - batch.go: Clarify batch file format in help text
Replace fmt.Fprintf(os.Stdout, ...) with u.Out().Printf(...) across all command files for consistent output handling through the UI abstraction. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add vault tests: matters CRUD, exports, holds - Add roles tests: get, update, delete, privileges - Add admin groups tests: update, delete, settings, members sync - Increases cmd package coverage from 63.1% to 65.5% Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add 45 new tests for resources buildings, calendars, and features commands: - Buildings: list, get, create, update, delete (with JSON/text output variants) - Calendars: list, get, create, update, delete (with JSON/text output variants) - Features: list, create, delete (with JSON/text output variants) - Input validation tests for empty IDs and missing required fields - Pagination and filtering tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add tests for AlertsGetCmd, AlertsDeleteCmd, AlertsUndeleteCmd, AlertsFeedbackCreateCmd, AlertsFeedbackListCmd, AlertsSettingsUpdateCmd, AliasesCreateCmd, and AliasesDeleteCmd. Tests cover plain text output, JSON output mode, validation errors, and confirmation requirements. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add tests for DomainsGetCmd, DomainsCreateCmd, DomainsDeleteCmd, DomainsAliasesListCmd, DomainsAliasesCreateCmd, and DomainsAliasesDeleteCmd. Tests cover JSON and plain text output modes, error handling, missing account validation, and confirmation requirements for destructive operations. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add tests for contacts delegates, domain, import, export, and dedup commands: - ContactsDelegatesAddCmd: add delegate functionality with JSON output - ContactsDelegatesRemoveCmd: remove delegate functionality with JSON output - ContactsDelegatesListCmd: JSON output and empty results handling - ContactsDomainCreateCmd: create contact with JSON output and validation - ContactsDomainDeleteCmd: delete by resource name/email with JSON output - ContactsDomainListCmd: JSON output and pagination - ContactsImportCmd: CSV parsing, JSON output, and error handling - ContactsExportCmd: CSV export to file/stdout with JSON output - ContactsDedupCmd: duplicate detection and dry-run mode Also includes unit tests for CSV helper functions: - normalizeCSVHeader, parseCSVRow, csvPerson - openCSVReader, openCSVWriter Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add 36 new tests for printers and forms commands: Printers (18 tests): - PrintersListCmd: list, JSON output, empty results, pagination - PrintersGetCmd: get, JSON output, empty ID validation - PrintersCreateCmd: create, JSON output, missing name/URI validation - PrintersUpdateCmd: update, empty ID and no-updates validation - PrintersDeleteCmd: delete, empty ID validation, confirmation check - Helper functions: printerResourceName, printerParent Forms (18 tests): - FormsListCmd: list, JSON output, empty results, pagination, user filter - FormsGetCmd: get, JSON output, empty ID validation, no-title handling - FormsCreateCmd: create, JSON output, missing/whitespace title validation - FormsResponsesCmd: list responses, JSON output, empty results, empty form ID, pagination All tests use mock HTTP servers to verify API interactions. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add tests for CAA (Context-Aware Access) levels commands - Add tests for Cloud Identity management commands - Add tests for license management commands - Add tests for schema management commands - Add tests for data transfer commands - Fix RootFlags.Yes -> RootFlags.Force in caa_test.go Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add comprehensive tests for config commands - Fix TestTransferApplicationsCmd_JSON: use string type for ID since JSON output serializes int64 as string Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ports, reseller, serviceaccounts Add extensive test coverage for previously uncovered commands: - labels: list, get, create, delete with JSON/text output - orgunits: create, delete, get, update, list - projects: list, get with JSON/text output - reports: activities, users, customer, drive, tokens - reseller: customers list/get, subscriptions list/get - serviceaccounts: list, create, delete Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add tests for calendar edit functions and event day parsing: - applyCreateEventType with various event types and transparency settings - parseEventTime and parseEventDate with valid and invalid inputs - edge cases for all-day events and timezone handling Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add extensive test coverage for authentication and chat commands: - Auth tests for login, status, logout, info, and switch flows - Chat tests for spaces, messages, threads operations Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add extensive test coverage for Google Classroom commands: - Courses (list, get, create, update, join, leave, url) - Coursework (list, get, create, assignees) - Guardians and guardian invites - Invitations (list, get, create, accept, delete) - Announcements (list, get, create, delete) - Materials (list, get, create, update, delete) - Roster, students, teachers, profile Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add shared EscapeDriveQueryValue to googleapi package that escapes backslashes and single quotes, preventing query injection when user-provided values contain those characters. Applied at all five interpolation sites and deduplicated existing local escape helpers. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Inline Drive query escape wrappers to use shared EscapeDriveQueryValue directly - Add comprehensive unit tests for EscapeDriveQueryValue - Fix CloudIdentity groups get to use UI layer instead of direct os.Stdout - Remove duplicate splitCSVFields, use splitCSV from split_helpers.go - Make adminCustomerID configurable via GOG_CUSTOMER_ID env var - Add t.Parallel() safety comment to testutil_test.go - Move cloudchannel stub from testutil_test.go to channel_test.go - Fix batch.go channel close pattern with goroutine - Document readValueOrFile file detection heuristic Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Address 124 lint findings across err113, goconst, govet shadow, gosec, unparam, wsl, staticcheck, thelper, nilnil, predeclared, ineffassign, and errorlint categories. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add --signature, --signature-name, and --signature-file flags to append Gmail signatures to outgoing messages. Supports fetching from Gmail send-as settings or from a local file. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Handle p/div/tr closing tags as line breaks, convert anchor tags to "text (URL)" format, collapse excessive newlines, and trim trailing whitespace. Adds table-driven unit tests covering all tag variants. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #180
Summary
--signature,--signature-name, and--signature-fileflags togmail sendfor appending Gmail signatures to outgoing messages<p>,<div>,<tr>,<a>tags (not just<br>)--signature-filefor safetyTest plan
go test ./...)golangci-lintreports 0 issues🤖 Generated with Claude Code