-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/add git workflow analyzer (#99)
* add sonarqube workflow * add readme description * add sonarqube and rsgpt by default * fix sonarqube dummy configuration * impruve readme
- Loading branch information
1 parent
31e0c7e
commit efb13c8
Showing
8 changed files
with
158 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/[email protected] | ||
# 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 }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |