Skip to content

Commit

Permalink
[connectors] Fixed github parents ordering (#7580)
Browse files Browse the repository at this point in the history
  • Loading branch information
tdraier committed Sep 20, 2024
1 parent 2bf607d commit cbca7a3
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 cbca7a3

Please sign in to comment.