diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 8551266..6a99dda 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -4,12 +4,10 @@
### Issue
[LINK TO JIRA/GITHUB ISSUE]
-#### Tasks [ISSUE TASKS covered in this PR when apply]
-- [ ] Task 1
-- [ ] Task 2
-
### Preview
[UI Preview]
#### Notes:
[extra note or considerations]
+
+@rs-gpt-review Describe the changes in this PR. Recommend improvements (including code improvements), possible memory leaks, and best practices.
diff --git a/.github/workflows/rs-gpt-review.yml b/.github/workflows/rs-gpt-review.yml
new file mode 100644
index 0000000..501ffba
--- /dev/null
+++ b/.github/workflows/rs-gpt-review.yml
@@ -0,0 +1,37 @@
+# File: .github/workflows/rs-gpt-review.yml
+name: 'rs-gpt-review'
+
+# Run the workflow on new issues, pull requests and comments
+on:
+ issues:
+ types: [opened]
+ pull_request:
+ types: [opened]
+ issue_comment:
+ types: [created]
+ pull_request_review_comment:
+ types: [created]
+
+# Allows the workflow to create comments on issues and pull requests
+permissions:
+ issues: write
+ pull-requests: write
+ contents: write
+
+jobs:
+ # Runs for issues, pull requests and comments
+ rs-gpt-review:
+ name: rs-gpt-review comment
+ # Only run the job if the comment contains @rs-gpt-review
+ if: ${{ github.event_name == 'issues' && contains(github.event.issue.body, '@rs-gpt-review') || github.event_name == 'pull_request' && contains(github.event.pull_request.body, '@rs-gpt-review') || github.event_name == 'issue_comment' && contains(github.event.comment.body, '@rs-gpt-review') || github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@rs-gpt-review') }}
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ # The action will only run if the description or comments mentions @rs-gpt-review
+ - uses: rootstrap/rs-gpt-review@v2
+ name: rs-gpt-review
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ openai_key: ${{ secrets.OPENAI_KEY }}
+ model: gpt-4-turbo
+ files_excluded: README.md, LICENSE, rs-gpt-review.yml, sonar-qube-scann.yml, .flutter-plugins, .flutter-plugins-dependencies
diff --git a/.github/workflows/sonar-qube-scann.yml b/.github/workflows/sonar-qube-scann.yml
new file mode 100644
index 0000000..a6b60f6
--- /dev/null
+++ b/.github/workflows/sonar-qube-scann.yml
@@ -0,0 +1,34 @@
+#SonarQube Configuration
+# This is the sonarqube configuration, check readme for instructions
+#name: 'sonarqube'
+#
+#on: push
+#
+#jobs:
+# sonarQubeTrigger:
+# name: Sonarqube-Trigger
+# runs-on: ubuntu-latest
+# steps:
+# - uses: dart-lang/setup-dart@v1
+# - name: Checkout code
+# uses: actions/checkout@v2
+# - uses: webfactory/ssh-agent@v0.9.0
+# with:
+# ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
+# - name: Set up Flutter
+# uses: subosito/flutter-action@v2
+# with:
+# channel: stable
+# flutter-version: 3.24.3
+# - run: flutter --version
+# - name: Get Dependencies
+# run: flutter pub get app && flutter pub get modules/domain && flutter pub get modules/data && flutter pub get modules/common
+# - name: Analyze App
+# #run analyze first
+# run: flutter analyze
+# - name: Setup Sonarqube Scanner
+# uses: warchant/setup-sonar-scanner@v8
+# - name: Run Sonarqube Scanner
+# run: sonar-scanner
+# -Dsonar.token=${{ secrets.SONAR_TOKEN }}
+# -Dsonar.host.url=${{ secrets.SONAR_URL }}
diff --git a/.idea/flutter-base.iml b/.idea/flutter-base.iml
index 5a36ec1..63f30ae 100644
--- a/.idea/flutter-base.iml
+++ b/.idea/flutter-base.iml
@@ -56,11 +56,16 @@
+
+
+
+
+
+
+
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml
index f235aca..8b6af92 100644
--- a/.idea/libraries/Dart_SDK.xml
+++ b/.idea/libraries/Dart_SDK.xml
@@ -1,27 +1,27 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/README.md b/README.md
index bf5d5d2..c40c4be 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,9 @@ This template comes with:
- Intl.
- State Management (Blocs/Cubit).
- Env config and flavors.
-- Chat with Gemini and Vertex AI (Documantation and setup WIP)
+- Chat with Gemini and Vertex AI (Documentation and setup WIP)
+- GitWorkflow config: RS-GPT-Review
+- GitWorkflow config: Sonarqube
## Initial Setup
@@ -188,7 +190,30 @@ TBD
We are using Bitrise to configure and run
the [CI/CD pipelines](https://www.notion.so/rootstrap/Flutter-CI-CD-9a0a5957ee8442908fc00c3ea8f49bf1)
-.
+
+### Github Actions: RS-GPT-Review
+- Configure GPT secrets vars on your repo settings:
+ - OPENAI_KEY
+#### Note: The action will only run if the description or comments mentions @rs-gpt-review
+
+### Github Actions: Sonarqube
+- Go to you sonarqube server and configure a new project.
+- Configure the sonar-project.properties:
+ example:
+ '''
+ sonar.projectKey=your-app-key
+ sonar.projectName=your-project-name
+ sonar.host.url=https://your-sonarqube-server.net
+ sonar.projectVersion=1.0
+ sonar.sourceEncoding=UTF-8
+ '''
+# Main source directories
+sonar.sources=app/lib,modules/domain,modules/data,modules/common
+sonar.dart.exclusions=pubspec.yaml
+sonar.dart.analyzer.report.mode=LEGACY
+- Configure Sonarqube secrets vars on your repo settings:
+ - SONAR_TOKEN (your sonarqube project token)
+ - SONAR_URL (your sonarqube server url)
## License
diff --git a/pubspec.yaml b/pubspec.yaml
new file mode 100644
index 0000000..20ca790
--- /dev/null
+++ b/pubspec.yaml
@@ -0,0 +1,21 @@
+# This config file is for Sonarqube only
+name: Sonar
+description: Sonar
+
+publish_to: "none"
+version: 0.0.1+1
+
+environment:
+ sdk: '>=3.0.0 <4.0.0'
+
+dependencies:
+ flutter:
+ sdk: flutter
+
+dev_dependencies:
+ flutter_test:
+ sdk: flutter
+
+flutter:
+ generate: true
+ uses-material-design: true
\ No newline at end of file
diff --git a/sonar-project.properties b/sonar-project.properties
new file mode 100644
index 0000000..1932d01
--- /dev/null
+++ b/sonar-project.properties
@@ -0,0 +1,9 @@
+sonar.projectKey=your-project-key
+sonar.projectName=your-project-name
+sonar.host.url=https://your-sonarqube-server.net
+sonar.projectVersion=1.0
+sonar.sourceEncoding=UTF-8
+# Main source directories
+sonar.sources=app/lib,modules/domain,modules/data,modules/common
+sonar.dart.exclusions=pubspec.yaml
+sonar.dart.analyzer.report.mode=LEGACY