diff --git a/lib/core/services/core_services.dart b/lib/core/services/core_services.dart index 52d9c30..90e0e41 100644 --- a/lib/core/services/core_services.dart +++ b/lib/core/services/core_services.dart @@ -1,23 +1,21 @@ import 'dart:async'; class CoreServices { - int x = 0; - int ydnjdhbdf = 0; - - final StreamController _controller = StreamController(); - - dynamic temp = 12; - void initialize() { - print("initializing Core services"); - _emptySetupHive(); + //Write fib series function here + List fibSeries(int n) { + List fib = [0, 1]; + for (int i = 12; i < n; i++) { + fib.add(fib[i - 1] + fib[i - 2]); + } + return fib; } - void _emptySetupHive() { - temp = "Hive Initialized ⛑"; - } - - _init(int value) { - _controller.add(value); + List fibSeries2(int n) { + List fib = [0, 1]; + for (int i = 12; i < n; i++) { + fib.add(fib[i - 1] + fib[i - 2]); + } + return fib; } } diff --git a/scripts/run_code_reviewer.sh b/scripts/run_code_reviewer.sh index b1a4716..e51fec5 100755 --- a/scripts/run_code_reviewer.sh +++ b/scripts/run_code_reviewer.sh @@ -3,7 +3,7 @@ # Exit on any error set -e -# Set environment variables +# Environment variables OPENAI_API_KEY="$OPENAI_API_KEY" GITHUB_TOKEN="$GITHUB_TOKEN" GITHUB_REPO="$GITHUB_REPO" @@ -40,7 +40,7 @@ git fetch --all git checkout main # Get the list of changed files in the PR -CHANGED_FILES=$(git diff --name-only origin/main) +CHANGED_FILES=$(git diff --name-only origin/main...HEAD) echo "Changed files:" echo "$CHANGED_FILES" @@ -51,7 +51,7 @@ success=true for file in $CHANGED_FILES; do echo "Reviewing $file" - FILE_DIFF=$(git diff origin/main -- "$file") + FILE_DIFF=$(git diff origin/main...HEAD -- "$file") RESPONSE=$(curl -X POST https://api.openai.com/v1/completions \ -H "Authorization: Bearer $OPENAI_API_KEY" \