From 240d96714f450462ed094d67eb5a78fe22ae3a16 Mon Sep 17 00:00:00 2001 From: Tushar Nikam Date: Mon, 16 Sep 2024 18:22:23 +0530 Subject: [PATCH 1/3] Update core_services.dart --- lib/core/services/core_services.dart | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/lib/core/services/core_services.dart b/lib/core/services/core_services.dart index 52d9c30..eef4c3d 100644 --- a/lib/core/services/core_services.dart +++ b/lib/core/services/core_services.dart @@ -1,23 +1,13 @@ 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(); - } - - void _emptySetupHive() { - temp = "Hive Initialized ⛑"; - } - - _init(int value) { - _controller.add(value); + //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; } } From 0f6f54348d7a2713007e4ae48e55e3d940caf27e Mon Sep 17 00:00:00 2001 From: Tushar Nikam Date: Mon, 16 Sep 2024 18:23:19 +0530 Subject: [PATCH 2/3] Update core_services.dart --- lib/core/services/core_services.dart | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/core/services/core_services.dart b/lib/core/services/core_services.dart index eef4c3d..90e0e41 100644 --- a/lib/core/services/core_services.dart +++ b/lib/core/services/core_services.dart @@ -9,6 +9,14 @@ class CoreServices { } return fib; } + + 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; + } } class CoreServiceees { From 95919ea744a388341a07a9bb8a91238d081cba10 Mon Sep 17 00:00:00 2001 From: Tushar Nikam Date: Mon, 16 Sep 2024 18:28:29 +0530 Subject: [PATCH 3/3] Update run_code_reviewer.sh --- scripts/run_code_reviewer.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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" \