Fixed how payload-as-prompt is handled and progress comment updates (#212)

This commit is contained in:
Mateusz Burzyński
2026-02-01 22:13:39 +00:00
committed by pullfrog[bot]
parent 18ba8e5fd0
commit bfe72ac2cf
8 changed files with 126 additions and 166 deletions
+1 -12
View File
@@ -1,16 +1,13 @@
import { log } from "./cli.ts";
import type { OctokitWithPlugins } from "./github.ts";
import { fetchWorkflowRunInfo, type WorkflowRunInfo } from "./workflowRun.ts";
interface ResolveRunParams {
octokit: OctokitWithPlugins;
apiToken: string;
}
export interface ResolveRunResult {
runId: string;
jobId: string | undefined;
workflowRunInfo: WorkflowRunInfo;
}
/**
@@ -25,14 +22,6 @@ export async function resolveRun(params: ResolveRunParams): Promise<ResolveRunRe
}
const [owner, repo] = githubRepo.split("/");
const workflowRunInfo = runId
? await fetchWorkflowRunInfo({ runId, apiToken: params.apiToken })
: { progressCommentId: null };
if (workflowRunInfo.progressCommentId) {
log.info(`» using pre-created progress comment: ${workflowRunInfo.progressCommentId}`);
}
let jobId: string | undefined;
const jobName = process.env.GITHUB_JOB;
if (jobName && runId) {
@@ -48,5 +37,5 @@ export async function resolveRun(params: ResolveRunParams): Promise<ResolveRunRe
}
}
return { runId, jobId, workflowRunInfo };
return { runId, jobId };
}