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:
Mateusz Burzyński
2026-01-30 11:32:14 +00:00
committed by pullfrog[bot]
parent c1f8247077
commit 2b3bd97b86
4 changed files with 27 additions and 12 deletions
+4 -1
View File
@@ -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}`);