refactor: remove hardcoded api keys and paths to make core analyzers generic

This commit is contained in:
Coco Sheng
2026-05-06 16:05:35 -04:00
parent 268fe7cbe1
commit ca9c2009cc
5 changed files with 109 additions and 77 deletions
+7 -1
View File
@@ -2,6 +2,12 @@
# Run from the project root or the scripts/backlog-analysis directory
# This script assumes it's running in the same directory as the python scripts
if [ -z "$GEMINI_API_KEY" ]; then
echo "Error: GEMINI_API_KEY environment variable is required."
echo "Usage: GEMINI_API_KEY=your_key ./loop_analyzer.sh"
exit 1
fi
while true; do
count=$(jq '[.[] | select(.analysis == "Failed to analyze autonomously" or .analysis == null or .analysis == "" or (.analysis | length) < 30)] | length' data/bugs.json)
if [ "$count" -eq 0 ]; then
@@ -9,6 +15,6 @@ while true; do
break
fi
echo "Remaining bugs: $count"
python3 single_turn_bug_analyzer.py
python3 single_turn_bug_analyzer.py --api-key "$GEMINI_API_KEY"
done
python3 generate_bugs_csv.py