({
projectId,
workspaceId,
gitRepositoryId,
}: GetProjectGitFileIssuesOptions)
| 312 | } |
| 313 | |
| 314 | export async function getProjectGitFileIssues({ |
| 315 | projectId, |
| 316 | workspaceId, |
| 317 | gitRepositoryId, |
| 318 | }: GetProjectGitFileIssuesOptions): Promise<WorkspaceFileIssue[]> { |
| 319 | const project = await services.project.getById(projectId); |
| 320 | if (!project || !models.project.isConnectedGitProject(project)) { |
| 321 | return []; |
| 322 | } |
| 323 | |
| 324 | const effectiveRepoId = models.project.getEffectiveRepoId(project); |
| 325 | if (gitRepositoryId && gitRepositoryId !== effectiveRepoId) { |
| 326 | return []; |
| 327 | } |
| 328 | |
| 329 | return mapWorkspaceFileIssues({ |
| 330 | issues: repoFileWatcherRegistry.getProblems(effectiveRepoId!), |
| 331 | repoId: effectiveRepoId!, |
| 332 | metas: await getProjectWorkspacesWithMeta(projectId), |
| 333 | workspaceId, |
| 334 | }); |
| 335 | } |
| 336 | |
| 337 | /** |
| 338 | * Return the current import problem message for the project's Spectral |
no test coverage detected