MCPcopy Create free account
hub / github.com/Kong/insomnia / getProjectGitFileIssues

Function getProjectGitFileIssues

packages/insomnia/src/main/git-service.ts:314–335  ·  view source on GitHub ↗
({
  projectId,
  workspaceId,
  gitRepositoryId,
}: GetProjectGitFileIssuesOptions)

Source from the content-addressed store, hash-verified

312}
313
314export 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

Callers 1

registerGitServiceAPIFunction · 0.85

Calls 3

mapWorkspaceFileIssuesFunction · 0.85
getProblemsMethod · 0.45

Tested by

no test coverage detected