Separate out MCP token

This commit is contained in:
Sean Goedecke
2025-08-04 03:06:53 +00:00
parent fc8527d1d9
commit 419f171f16
5 changed files with 30 additions and 5 deletions
Generated Vendored
+3 -1
View File
@@ -52130,13 +52130,15 @@ async function run() {
if (token === undefined) {
throw new Error('GITHUB_TOKEN is not set');
}
// Get GitHub MCP token (use dedicated token if provided, otherwise fall back to main token)
const githubMcpToken = coreExports.getInput('github-mcp-token') || token;
const endpoint = coreExports.getInput('endpoint');
// Build the inference request with pre-processed messages and response format
const inferenceRequest = buildInferenceRequest(promptConfig, systemPrompt, prompt, modelName, maxTokens, endpoint, token);
const enableMcp = coreExports.getBooleanInput('enable-github-mcp') || false;
let modelResponse = null;
if (enableMcp) {
const mcpClient = await connectToGitHubMCP(inferenceRequest.token);
const mcpClient = await connectToGitHubMCP(githubMcpToken);
if (mcpClient) {
modelResponse = await mcpInference(inferenceRequest, mcpClient);
}
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long