Forward API calls from the preview repos (#211)
* Forward API calls from the preview repos * tweak doc * tweak * fix workflow-run forwarding
This commit is contained in:
committed by
pullfrog[bot]
parent
c1f8247077
commit
2b3bd97b86
+4
-1
@@ -4,6 +4,7 @@ import { fetchWorkflowRunInfo, type WorkflowRunInfo } from "./workflowRun.ts";
|
||||
|
||||
interface ResolveRunParams {
|
||||
octokit: OctokitWithPlugins;
|
||||
apiToken: string;
|
||||
}
|
||||
|
||||
export interface ResolveRunResult {
|
||||
@@ -24,7 +25,9 @@ export async function resolveRun(params: ResolveRunParams): Promise<ResolveRunRe
|
||||
}
|
||||
const [owner, repo] = githubRepo.split("/");
|
||||
|
||||
const workflowRunInfo = runId ? await fetchWorkflowRunInfo(runId) : { progressCommentId: null };
|
||||
const workflowRunInfo = runId
|
||||
? await fetchWorkflowRunInfo({ runId, apiToken: params.apiToken })
|
||||
: { progressCommentId: null };
|
||||
|
||||
if (workflowRunInfo.progressCommentId) {
|
||||
log.info(`» using pre-created progress comment: ${workflowRunInfo.progressCommentId}`);
|
||||
|
||||
Reference in New Issue
Block a user