aboutsummaryrefslogtreecommitdiff
path: root/src/scraper.ts
diff options
context:
space:
mode:
authorJoe Mou <dev@mou.fo>2026-07-15 01:46:06 -0400
committerJoe Mou <dev@mou.fo>2026-07-15 01:46:06 -0400
commit0f4681d55b9d865a4e860fb3f28203ffd0bdc034 (patch)
tree99e68407aeb84585d82fa3e4eb2bb312bca01e27 /src/scraper.ts
parent1866da82aea7be7b161f45cedc3737d2147f2c4c (diff)
Replace null overview files with HTML comments
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Diffstat (limited to 'src/scraper.ts')
-rw-r--r--src/scraper.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/scraper.ts b/src/scraper.ts
index 760a306..53f2bb1 100644
--- a/src/scraper.ts
+++ b/src/scraper.ts
@@ -31,7 +31,8 @@ interface TreeItem {
interface OverviewFile {
displayName: string;
- richText?: string;
+ // null when GitHub includes the file without rendered content.
+ richText?: string | null;
}
interface IssueNode {
@@ -220,7 +221,7 @@ interface GitHubNav extends GitHubCommon {
export interface GitHubTree extends GitHubNav {
items: TreeItem[];
- overviewHtml?: Record<string, string>;
+ overviewHtml?: Record<string, string | null>;
}
export interface RepoInfo {
@@ -443,8 +444,8 @@ function parseRepoInfo(html: string): RepoInfo {
function extractOverviewHtml(
overviewFiles: OverviewFile[] = [],
-): Record<string, string> | undefined {
- const result: Record<string, string> = {};
+): Record<string, string | null> | undefined {
+ const result: Record<string, string | null> = {};
for (const file of overviewFiles) {
if (file.richText !== undefined) {
result[file.displayName] = file.richText;