Title#
MT-5: Migrate PhaseHooksService from GitHubService to PlatformProvider
Problem#
PhaseHooksService was directly injected with GitHubService, coupling phase lifecycle hooks to GitHub-specific infrastructure. This blocks multi-platform support in the multi-tenant initiative.
Task / Link#
Closes #349 — Wave 2 consumer migration (depends on #345 PlatformProvider interface)
Changes#
- Replace
GitHubServiceinjection inPhaseHooksServicewith@Inject(PLATFORM_PROVIDER) platform: PlatformProvider - Replace all
this.github.*call sites withthis.platform.* - Use optional chaining on
setProjectItemStatus?.()for platforms without project boards - Replace
GitHubModuleimport inPhaseHooksModulewithPlatformModule - Add
PlatformProviderinterface,PlatformModule, andGitHubPlatformProviderimplementation - Update spec to mock
PLATFORM_PROVIDERtoken instead ofGitHubService
Notes#
setProjectItemStatusis typed as optional onPlatformProvider— optional chaining is intentional and correct- PR should not merge until #345 lands on
rc/multi-tenant(or base branch contains PlatformProvider)
Testing#
- Unit tests:
npm run test -- --testPathPatterns=phase-hooks— 36/36 passing - Lint:
npm run lint— zero warnings