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

Function getProjectGitFileIssues

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

Source from the content-addressed store, hash-verified

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

Callers 1

registerGitServiceAPIFunction · 0.85

Calls 3

mapWorkspaceFileIssuesFunction · 0.85
getProblemsMethod · 0.45

Tested by

no test coverage detected