Summary
PullRequestsModule currently exports both PullRequestsService and PullRequestsRepository. Other modules should interact with pull requests only through the service layer, not directly via the repository.
Change
In apps/api/src/modules/pull-requests/pull-requests.module.ts, remove PullRequestsRepository from the exports array so only PullRequestsService is exported.
This enforces proper layering — the service contains business logic and is the public API of the module, while the repository remains an internal implementation detail.
Steps
- Remove
PullRequestsRepository from exports in PullRequestsModule - Verify no other module injects
PullRequestsRepository directly (fix any that do to use the service instead)
Summary
PullRequestsModulecurrently exports bothPullRequestsServiceandPullRequestsRepository. Other modules should interact with pull requests only through the service layer, not directly via the repository.Change
In
apps/api/src/modules/pull-requests/pull-requests.module.ts, removePullRequestsRepositoryfrom theexportsarray so onlyPullRequestsServiceis exported.This enforces proper layering — the service contains business logic and is the public API of the module, while the repository remains an internal implementation detail.
Steps
PullRequestsRepositoryfromexportsinPullRequestsModulePullRequestsRepositorydirectly (fix any that do to use the service instead)