This commit is contained in:
Colin McDonnell
2026-01-25 08:38:59 +00:00
committed by pullfrog[bot]
parent aeae128d1f
commit 7144f3de88
2 changed files with 30 additions and 64 deletions
+27 -42
View File
@@ -106235,32 +106235,6 @@ async function revokeGitHubInstallationToken(token) {
}
}
// utils/workflowRun.ts
async function fetchWorkflowRunInfo(runId) {
const apiUrl = process.env.API_URL || "https://pullfrog.com";
const timeoutMs = 3e4;
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), timeoutMs);
try {
const response = await fetch(`${apiUrl}/api/workflow-run/${runId}`, {
method: "GET",
headers: {
"Content-Type": "application/json"
},
signal: controller.signal
});
clearTimeout(timeoutId);
if (!response.ok) {
return { progressCommentId: null };
}
const data = await response.json();
return data;
} catch {
clearTimeout(timeoutId);
return { progressCommentId: null };
}
}
// node_modules/.pnpm/@toon-format+toon@1.4.0/node_modules/@toon-format/toon/dist/index.mjs
var LIST_ITEM_MARKER = "-";
var LIST_ITEM_PREFIX = "- ";
@@ -106968,22 +106942,7 @@ async function ensureProgressCommentUpdated(toolState) {
if (toolState.lastProgressBody) {
return;
}
let existingCommentId = toolState.progressComment.id;
if (!existingCommentId) {
const runId2 = process.env.GITHUB_RUN_ID;
if (runId2) {
try {
const workflowRunInfo = await fetchWorkflowRunInfo(runId2);
if (workflowRunInfo.progressCommentId) {
existingCommentId = parseInt(workflowRunInfo.progressCommentId, 10);
if (Number.isNaN(existingCommentId)) {
existingCommentId = null;
}
}
} catch {
}
}
}
const existingCommentId = toolState.progressComment.id;
if (!existingCommentId) {
return;
}
@@ -158429,6 +158388,32 @@ var Timer = class {
}
};
// utils/workflowRun.ts
async function fetchWorkflowRunInfo(runId) {
const apiUrl = process.env.API_URL || "https://pullfrog.com";
const timeoutMs = 3e4;
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), timeoutMs);
try {
const response = await fetch(`${apiUrl}/api/workflow-run/${runId}`, {
method: "GET",
headers: {
"Content-Type": "application/json"
},
signal: controller.signal
});
clearTimeout(timeoutId);
if (!response.ok) {
return { progressCommentId: null };
}
const data = await response.json();
return data;
} catch {
clearTimeout(timeoutId);
return { progressCommentId: null };
}
}
// utils/workflow.ts
async function resolveRun(params) {
const runId = process.env.GITHUB_RUN_ID || "";