AI Agents SDE Task Viewer
      • Pr description
  1. Home
  2. AgentSDE
  3. agent-core
  4. gh-543
  5. changes
  6. pr_description.md
pr_description.md(2.5 KB)· Apr 24, 2026· 2 min read
  • BJ-3: JiraOAuthAuthProvider + JiraModule wiring
  • Problem
  • Task / Link
  • Changes
  • Notes
  • Testing

BJ-3: JiraOAuthAuthProvider + JiraModule wiring#

Title: feat(jira): add JiraOAuthAuthProvider and JiraModule (BJ-3)

Problem#

The Atlassian integration epic (#539) requires a concrete OAuth auth provider for Jira Cloud. Without it, no Jira API calls can be authenticated. This is Wave 1 and unblocks all Jira API work in the epic.

Task / Link#

Closes #543 — BJ-3: JiraOAuthAuthProvider
Part of EPIC #539 · Wave 1 · depends on #540 (BJ-0) and #541 (BJ-1)

Changes#

  • src/jira/jira-oauth-auth.provider.ts — Concrete JiraOAuthAuthProvider extending AtlassianOAuthAuthProvider; platform = 'jira'; token endpoint https://auth.atlassian.com/oauth/token; getBotUsername() reads JIRA_BOT_USERNAME from config
  • src/jira/jira-oauth-auth.provider.spec.ts — Unit tests: platform id, bot username happy path, missing-config error, token endpoint forwarded to base constructor
  • src/jira/jira.module.ts — NestJS module with useFactory gated on JIRA_OAUTH_CLIENT_ID; provides PLATFORM_AUTH_PROVIDER; exports it
  • src/atlassian/atlassian-oauth-auth.provider.ts — Minimal stub of AtlassianOAuthAuthProvider (BJ-1 base class) to unblock this PR while #541 is open; remove once BJ-1 is merged
  • src/atlassian/index.ts — Barrel re-exporting the stub types and token
  • src/config/config.schema.ts — Seven optional JIRA_* Joi entries (feature-gated by JIRA_OAUTH_CLIENT_ID)
  • .env.example — Documents the seven JIRA_* env vars under # Jira (optional) section
  • CLAUDE.md — Adds atlassian to the Key modules list

Notes#

  • ⚠️ src/atlassian/ contains a stub implementation of AtlassianOAuthAuthProvider. On merge to rc/atlassian-integration (which already has the real BJ-1 implementation), the stub files should be replaced by the real ones — expected outcome of the PR merge review.
  • JiraModule uses PLATFORM_AUTH_PROVIDER token as specified in the plan. Note: importing this alongside GitHubModule in the same DI scope will cause a duplicate-token conflict; keep imports local to Jira-only consumers until Wave 2 resolves multi-platform routing.
  • The app boots cleanly without any JIRA_* env vars set; getToken() on the stub throws if called (full implementation in BJ-1).

Testing#

  • 4 unit tests added in jira-oauth-auth.provider.spec.ts: platform id, getBotUsername() happy path, missing-config error, token endpoint forwarding
  • Full test suite: 838 tests pass, 0 failures
  • Lint: 0 errors, 0 warnings
PrdAi-done