feat: include public GitHub submodules in shared repositories (#914)

* feat: include public GitHub submodules in shared repositories

* fix: preserve submodule access across token and document contexts
This commit is contained in:
Thomas Durieux authored and GitHub committed 2026-11-02 09:00:02 +01:00
1 parent 6099356e0e
commit d0b217a448
17 files changed
+617 -87

No files matched your search

+2 -1
View File
@@ -34,6 +34,7 @@ router.post(
getToken: () => token,
anonymizerOptions: { ...anonymizerOptions, repoId },
contentOptions,
submodules: req.body.submodules,
},
res
);
@@ -89,7 +90,7 @@ router.post("/", async (req: express.Request, res: express.Response) => {
const content = await source.getFileContentCache(
filePath,
repoId,
() => ({ sha: fileSha, size: fileSize })
() => ({ sha: fileSha, size: fileSize, upstream: req.body.upstream })
);
if (res.destroyed || res.writableEnded) { content.destroy(); anonymizer.destroy(); return; }
const mime = lookup(filePath);