Skip to content

Commit e738ec2

Browse files
committed
Fix token assignment in main.ts
1 parent b427f83 commit e738ec2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

main.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,12 @@ async function main(
265265
const functionName = toolCall.function.name;
266266
const functionToCall = availableFunctions[functionName];
267267
const functionArgs = JSON.parse(toolCall.function.arguments);
268+
if ('token' in functionArgs) {
269+
functionArgs.token = gh_token;
270+
}
268271
console.log('Function arguments:', functionArgs);
269272
const functionResponse = await functionToCall(
270-
gh_token,
273+
functionArgs.token,
271274
functionArgs.username,
272275
functionArgs.repoName,
273276
functionArgs.pullRequestNumber,

0 commit comments

Comments
 (0)