Skip to content

Commit 9cf274c

Browse files
CopilotFuzzysTodd
andcommitted
Address code review feedback: fix logic, update docs, improve .gitignore
Co-authored-by: FuzzysTodd <157565446+FuzzysTodd@users.noreply.github.com>
1 parent 0399249 commit 9cf274c

4 files changed

Lines changed: 5 additions & 11 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,6 @@ tools/k6/.env
5656
.env
5757
.env.local
5858
*.key
59-
*api-key*
59+
.api-key
60+
api-key.txt
6061

scripts/analysis/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The Gemini Agent is a Node.js-based code analysis tool that uses Google's Gemini
1313

1414
## Prerequisites
1515

16-
1. Node.js installed (version 14 or higher)
16+
1. Node.js installed (version 18 or higher for native fetch support)
1717
2. Google Gemini API Key (obtain from [Google AI Studio](https://aistudio.google.com/))
1818
3. Dependencies installed (run `yarn install` or `npm install`)
1919

scripts/analysis/gemini-agent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ async function runAnalysis(codeContent, filePath, apiKey) {
6161
// --- DEEP THINK REPAIR LOGIC ---
6262
// A real agent would look for the 'REPAIRED CODE BLOCK' and attempt to
6363
// write it back to the file system or comment on the PR using the GitHub Token.
64-
const repairNeeded = analysisText.includes('REPAIRED CODE BLOCK') || analysisText.includes('NO REPAIR NEEDED');
65-
if (repairNeeded) {
64+
const analysisComplete = analysisText.includes('REPAIRED CODE BLOCK') || analysisText.includes('NO REPAIR NEEDED');
65+
if (analysisComplete) {
6666
console.log("Analysis Complete. Check output for repair instructions.");
6767
}
6868

scripts/analysis/workflow-example.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,3 @@ jobs:
3737
run: |
3838
# Example: Analyze a specific file
3939
node scripts/analysis/gemini-agent.js ${{ github.event.inputs.file_path || 'README.md' }} --api-key=$GEMINI_API_KEY
40-
41-
- name: Upload analysis results
42-
if: always()
43-
uses: actions/upload-artifact@v4
44-
with:
45-
name: gemini-analysis
46-
path: analysis-results.txt

0 commit comments

Comments
 (0)