Problem#
ClaudeInvocationService hard-coded GitHub credentials for every Claude invocation. The service needed to select the correct auth provider and inject platform-specific env vars based on task.platform (github | bitbucket | jira).
Task / Link#
BJ-10 — Closes #550
Changes#
ClaudeInvocationService: switched from singlePLATFORM_AUTH_PROVIDERto per-platform optional injections (@Optional()for Bitbucket and Jira); added aswitchonenv['PLATFORM']that emits the correct token/username/config env block per platformInvokeModule: importsBitbucketModuleandJiraModule(both optional — app boots without Atlassian credentials)phase-router/buildEnv(): setsenv['PLATFORM'] = task.platform ?? 'github'so the platform field flows end-to-end from task to invocationclaude-invocation.service.spec.ts: added tests for github regression, bitbucket env injection, jira env injection, and throws-when-provider-missing cases
Notes#
task.platformcolumn (BJ-0 / #540) is not yet onTaskEntity; the cast falls back to'github'until BJ-0 lands- Unknown platform values fall through to the
defaultcase which uses the GitHub provider (safe fallback) BITBUCKET_REPOenv var removed — workspace is the install boundary per #595
Testing#
npm run test— 999 tests pass, 62 suites (includes new platform-switching cases)npm run lint— zero warnings