Fixed how payload-as-prompt is handled and progress comment updates (#212)
This commit is contained in:
committed by
pullfrog[bot]
parent
18ba8e5fd0
commit
bfe72ac2cf
+1
-12
@@ -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 };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user