mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-11-18 01:54:23 +01:00
fix: preserve and anonymize truncated folder warnings
This commit is contained in:
3 files changed
+19
-3
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { anonymizePath } from "../../core/anonymize-utils";
|
||||
import * as express from "express";
|
||||
import config from "../../config";
|
||||
import got from "got";
|
||||
@@ -389,7 +390,9 @@ router.get(
|
||||
isAdmin: user?.isAdmin === true,
|
||||
isOwner: user?.id == repo.model.owner,
|
||||
hasWebsite: !!repo.options.page && !!repo.options.pageSource,
|
||||
truncatedFolders: repo.model.truncatedFolders || [],
|
||||
truncatedFolders: (repo.model.truncatedFolders || []).map((path) =>
|
||||
anonymizePath(path, repo.options.terms || [])
|
||||
),
|
||||
// Submodule contents are not included in GitHub archives/trees, so
|
||||
// they end up as empty folders in the anonymized repository. Surface
|
||||
// a warning in the explorer when the repository uses submodules (#737).
|
||||
|
||||
Reference in new issue
Block a user