Skip to content

Commit

Permalink
Fixed guthub parents ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
tdraier committed Sep 20, 2024
1 parent 015d0ea commit c3a883f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions connectors/src/connectors/github/lib/hierarchy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ async function getGithubCodeDirectoryParentIds(
directory.parentInternalId,
repoId
);
return [...parents, directory.parentInternalId];
return [directory.parentInternalId, ...parents];
} else if (directory.parentInternalId === `github-code-${repoId}`) {
return [`${repoId}`, `github-code-${repoId}`];
return [`github-code-${repoId}`, `${repoId}`];
}
return [];
}
Expand Down Expand Up @@ -72,7 +72,7 @@ async function getGithubCodeFileParentIds(
file.parentInternalId,
repoId
);
return [...parents, file.parentInternalId];
return [file.parentInternalId, ...parents];
} else if (file.parentInternalId === `github-code-${repoId}`) {
return [`${repoId}`, `github-code-${repoId}`];
}
Expand Down

0 comments on commit c3a883f

Please sign in to comment.