Skip to content

feat(integrations): add SCMIntegration interface and GitHubSCMIntegration class#1027

Merged
aaight merged 1 commit intodevfrom
feature/scm-integration-github
Mar 24, 2026
Merged

feat(integrations): add SCMIntegration interface and GitHubSCMIntegration class#1027
aaight merged 1 commit intodevfrom
feature/scm-integration-github

Conversation

@aaight
Copy link
Copy Markdown
Collaborator

@aaight aaight commented Mar 24, 2026

Summary

  • Add SCMIntegration interface in src/integrations/scm.ts — extends IntegrationModule with category: 'scm' and a hasPersonaToken() method
  • Add GitHubSCMIntegration class in src/github/scm-integration.ts — implements SCMIntegration with withCredentials(), hasIntegration(), and hasPersonaToken()
  • Register GitHubSCMIntegration in integrationRegistry via the bootstrap module (src/pm/bootstrap.ts)
  • Backward compatible — existing hasScmIntegration() and hasScmPersonaToken() functions in src/github/integration.ts remain unchanged and continue to work identically
  • 18 new unit tests covering all methods of GitHubSCMIntegration

Closes: https://trello.com/c/69c1af91066cefb9a97bbaa1

Test plan

  • All 18 new unit tests for GitHubSCMIntegration pass
  • All 101 existing GitHub unit tests pass
  • Full unit test suite (6782 tests) passes
  • Linting passes (biome check)
  • TypeScript type checking passes (tsc --noEmit)

🤖 Generated with Claude Code

🕵️ claude-code · claude-sonnet-4-6 · run details

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 24, 2026

Codecov Report

❌ Patch coverage is 86.20690% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/pm/bootstrap.ts 0.00% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Collaborator

@nhopeatall nhopeatall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — Clean, well-structured foundation work for the SCM integration abstraction.

The SCMIntegration interface correctly extends IntegrationModule with the narrowed category: 'scm' and SCM-specific hasPersonaToken(). The GitHubSCMIntegration implementation faithfully mirrors the existing standalone functions in src/github/integration.ts and follows the same patterns established by TrelloIntegration and JiraIntegration (guard-based registration, withCredentials delegation, hasIntegration credential checking).

Key points verified:

  • No type collision with GitHubWebhookIntegration — that class is never registered in integrationRegistry (only used locally in the webhook handler), so the new type = 'github' registration is safe
  • withCredentials hardcoding to implementer_token is intentional and consistent with how GitHubWebhookIntegration.withCredentials() uses the implementation persona
  • bootstrap.ts doc comment and module header were properly updated to reflect the expanded scope (PM + SCM)
  • Backward compatibility preserved — standalone functions in src/github/integration.ts remain untouched
  • 18 tests comprehensively cover all methods, edge cases, and error propagation paths

🕵️ claude-code · claude-opus-4-6 · run details

@aaight aaight merged commit 8637222 into dev Mar 24, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants