Skip to content

Commit

Permalink
analysis output 2
Browse files Browse the repository at this point in the history
  • Loading branch information
davecthomas committed Mar 15, 2024
1 parent b66e81c commit 309523a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,11 @@ async function processDiffsAiDescription(
)
)
let arrayDiffResponse = await Promise.all(promises)
core.setOutput(
processDiffsAiDescription.name,
JSON.stringify(arrayDiffResponse)
)
core.setOutput("processDiffsAiDescription", JSON.stringify(arrayDiffResponse))
}

// Fetch analysis from OpenAI for each diff and set the output based on the function name
async function processDiffsAiAnalysis(openAiClient: OpenAI, diffs: string[]) {
console.log(`testing ${processDiffsAiAnalysis.name}`)
let promises = diffs.map((diff) =>
promptOpenAI(
openAiClient,
Expand All @@ -146,7 +142,7 @@ async function processDiffsAiAnalysis(openAiClient: OpenAI, diffs: string[]) {
)
)
let arrayDiffResponse = await Promise.all(promises)
core.setOutput(processDiffsAiAnalysis.name, JSON.stringify(arrayDiffResponse))
core.setOutput("processDiffsAiAnalysis", JSON.stringify(arrayDiffResponse))
}

export async function run(): Promise<void> {
Expand Down

0 comments on commit 309523a

Please sign in to comment.