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 -3
View File
@@ -37,14 +37,15 @@ export async function main(): Promise<MainResult> {
await using tokenRef = await resolveInstallationToken();
const octokit = createOctokit(tokenRef.token);
const runInfo = await resolveRun({ octokit });
const runContext = await resolveRunContextData({ octokit, token: tokenRef.token });
timer.checkpoint("runContextData");
const runInfo = await resolveRun({ octokit, apiToken: runContext.apiToken });
const toolState = initToolState({ runInfo });
setupExitHandler(toolState);
try {
const runContext = await resolveRunContextData({ octokit, token: tokenRef.token });
timer.checkpoint("runContextData");
// resolve payload after runContextData so permissions can use DB settings
// precedence: action inputs > json payload > repoSettings > fallbacks