refactor: integration credential model + post-refactor cleanup#439
Merged
zbigniewsobiecki merged 1 commit intodevfrom Feb 20, 2026
Merged
refactor: integration credential model + post-refactor cleanup#439zbigniewsobiecki merged 1 commit intodevfrom
zbigniewsobiecki merged 1 commit intodevfrom
Conversation
…ntial model
Replace the flat project_credential_overrides table with a normalized
integration credential model: project_integrations now carry category
(pm/scm), provider (trello/jira/github), config JSONB, and triggers
JSONB. Credentials are linked per-integration via the
integration_credentials join table with provider-defined roles
(e.g. trello has api_key/token, github has implementer_token/reviewer_token).
Key changes:
- New integration_credentials schema + migration (0013)
- New integrationRoles.ts defining PROVIDER_CREDENTIAL_ROLES with
role→envVarKey mappings per provider
- credentialsRepository: replace resolveAllCredentials/listProjectOverrides
with resolveAllIntegrationCredentials/resolveAllOrgCredentials
- settingsRepository: add integration credential CRUD (set/remove/list)
- configRepository: update findProjectByIdFromDb for category/provider
- provider.ts: rewrite loadProjectConfigById for new model
- All trigger handlers, router modules, personas, and worker-manager
updated to use new credential resolution
- tRPC projects router: add integration credential endpoints
- CLI: update integration-set/overrides commands for category/provider,
repurpose override-set/override-rm for integration credentials
- Dashboard: rewrite integration-form.tsx for new model, remove
credential-overrides.tsx
- tools/resolve-config.ts: rewrite for new credential model, fix
broken imports, remove non-existent schema fields
- tools/manage-secrets.ts, setup-webhooks.ts, debug-run.ts updated
Post-refactor cleanup:
- Fix runs list CLI crash (was passing {data,total} to outputTable)
- Remove dead GITHUB_TOKEN fallback in webhooks router
- Remove dead mocks in access-control.test.ts
- Fix stale comment in envScrub.ts
- Add regression test for GITHUB_TOKEN_IMPLEMENTER-only resolution
- Update CLAUDE.md documentation
All 2372 tests pass, typecheck clean, lint clean (same 2 pre-existing
complexity warnings).
Co-Authored-By: Claude Opus 4.6 <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.
Summary
project_credential_overrideswith a normalized integration credential model:project_integrationsnow carrycategory(pm/scm),provider(trello/jira/github), and credentials are linked per-integration viaintegration_credentialsjoin table with provider-defined rolesintegrationRoles.tsdefiningPROVIDER_CREDENTIAL_ROLESwith role-to-env-var-key mappings per provider (trello: api_key/token, jira: email/api_token, github: implementer_token/reviewer_token)tools/resolve-config.ts, fixruns listCLI crash, remove deadGITHUB_TOKENfallback, remove dead mocks, fix stale commentsSchema changes
0013_integration_model_refactor.sql: addscategory/provider/triggerscolumns toproject_integrations, createsintegration_credentialstable, migrates data from oldtypecolumn, dropsproject_credential_overridesAffected subsystems
Test plan
npm run typecheck— cleannpm run lint— clean (same 2 pre-existing complexity warnings)npm test— all 2372 tests pass (151 files)🤖 Generated with Claude Code