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