feat: Changed GitHub API endpoint from fetching recursive git tree structure to retrieving commit history for a specific path.

This commit is contained in:
Fabien POLLY
2026-01-24 17:38:51 +01:00
parent e6810a739b
commit 04496b9890

View File

@@ -1466,7 +1466,8 @@
if (!branch) continue; if (!branch) continue;
debugLog(`[Bjorn] 🌐 Fetching structure from GitHub API: ${STATE.repo}/${branch}`); debugLog(`[Bjorn] 🌐 Fetching structure from GitHub API: ${STATE.repo}/${branch}`);
try { try {
const res = await fetch(`https://api.github.com/repos/${STATE.repo}/git/trees/${branch}?recursive=1`);
const res = await fetch(`https://api.github.com/repos/${STATE.repo}/commits?path=${path}&sha=${STATE.branch}&page=1&per_page=1`);
if (!res.ok) { if (!res.ok) {
debugLog(`[Bjorn] ⚠️ Branch "${branch}" failed (${res.status})`); debugLog(`[Bjorn] ⚠️ Branch "${branch}" failed (${res.status})`);
continue; continue;