github token

This commit is contained in:
Shawn Morreau
2025-11-21 14:00:12 -05:00
parent 99e572194d
commit 589592372f
4 changed files with 7 additions and 31 deletions
+3 -8
View File
@@ -135,7 +135,6 @@ To fix this, add the required secret to your GitHub repository:
interface MainContext {
inputs: Inputs;
githubInstallationToken: string;
tokenToRevoke: string | null;
repoContext: RepoContext;
agentName: AgentNameType;
agent: (typeof agents)[AgentNameType];
@@ -155,16 +154,14 @@ async function initializeContext(
Inputs.assert(inputs);
setupGitConfig();
const { githubInstallationToken, wasAcquired } = await setupGitHubInstallationToken();
const tokenToRevoke = wasAcquired ? githubInstallationToken : null;
const githubInstallationToken = await setupGitHubInstallationToken();
const repoContext = parseRepoContext();
return {
inputs,
githubInstallationToken,
tokenToRevoke,
repoContext,
agentName: "claude" as AgentNameType,
agentName: "claude",
agent: agents.claude,
sharedTempDir: "",
mcpLogPath: "",
@@ -292,7 +289,5 @@ async function cleanup(ctx: Omit<MainContext, "mcpServers" | "cliPath" | "apiKey
if (ctx.pollInterval) {
clearInterval(ctx.pollInterval);
}
if (ctx.tokenToRevoke) {
await revokeInstallationToken(ctx.tokenToRevoke);
}
await revokeInstallationToken(ctx.githubInstallationToken);
}