mirror of
https://github.com/infinition/Bjorn.git
synced 2026-02-05 03:31:02 +00:00
feat: Changed GitHub API endpoint from fetching recursive git tree structure to retrieving commit history for a specific path.
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user