fix(cli): add email category support to integration-credential commands#569
Merged
zbigniewsobiecki merged 1 commit intodevfrom Feb 27, 2026
Merged
Conversation
The three CLI integration-credential commands (list, set, remove) hardcoded `options: ['pm', 'scm']`, actively rejecting `--category email` even though the tRPC API already accepts all three categories. Users with email integrations had no CLI path to inspect or manage linked credentials. Changes: - `projects/overrides.ts`: add 'email' to category options; default sweep now includes pm + scm + email - `projects/override-set.ts`: add 'email' to category options and type cast - `projects/override-rm.ts`: add 'email' to category options and type cast - `email/integration-set.ts`: fix IMAP guidance note to include `--category email` so users land on the right command Also fix pre-existing `noExcessiveCognitiveComplexity` lint warning in `agent-execution.ts` by extracting the validation failure handling block into a `notifyValidationFailure` helper (complexity 17 → 12). Tests: - New `tests/unit/cli/dashboard/projects/integration-credentials.test.ts` covers all three categories for list/set/remove, plus rejection of unknown values and JSON output - New `tests/unit/cli/dashboard/email/integration-set.test.ts` covers gmail/imap upsert, custom config JSON, and the IMAP credential guidance - Extended `tests/unit/api/routers/projects.test.ts` with email category cases for all three integrationCredentials router procedures Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
5 tasks
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.
Summary
integration-credentialCLI commands (list,set,remove) hardcodedoptions: ['pm', 'scm'], actively rejecting--category emaileven though the tRPC API already acceptsz.enum(['pm', 'scm', 'email']). Users with email integrations had no CLI path to inspect or manage linked credentials.cascade email integration-set --provider imaptold users to runcascade projects integration-credential-setwithout--category email, causing an immediate validation error.noExcessiveCognitiveComplexitywarning inagent-execution.tsfixed by extracting the validation failure handling block into anotifyValidationFailurehelper.Changes
src/cli/dashboard/projects/overrides.ts'email'to category options; default sweep now includespm + scm + emailsrc/cli/dashboard/projects/override-set.ts'email'to category options and type castsrc/cli/dashboard/projects/override-rm.ts'email'to category options and type castsrc/cli/dashboard/email/integration-set.ts--category emailsrc/triggers/shared/agent-execution.tsnotifyValidationFailurehelper; complexity 17 → 12Tests
tests/unit/cli/dashboard/projects/integration-credentials.test.ts— covers all three categories for list/set/remove, rejection of unknown values, and JSON outputtests/unit/cli/dashboard/email/integration-set.test.ts— covers gmail/imap upsert, custom config JSON, and the corrected IMAP credential guidancetests/unit/api/routers/projects.test.ts— email category cases for all threeintegrationCredentialsrouter proceduresTest plan
npm test)npm run lint)npm run typecheck)--category emailaccepted by all three commands--category billingrejected by all three commands--category email🤖 Generated with Claude Code