Skip to content

Commit 7d63af6

Browse files
committed
add sonarqube workflow
1 parent 31e0c7e commit 7d63af6

File tree

3 files changed

+70
-0
lines changed

3 files changed

+70
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# File: .github/workflows/rs-gpt-review.yml
2+
name: 'rs-gpt-review'
3+
4+
# Run the workflow on new issues, pull requests and comments
5+
on:
6+
issues:
7+
types: [opened]
8+
pull_request:
9+
types: [opened]
10+
issue_comment:
11+
types: [created]
12+
pull_request_review_comment:
13+
types: [created]
14+
15+
# Allows the workflow to create comments on issues and pull requests
16+
permissions:
17+
issues: write
18+
pull-requests: write
19+
contents: write
20+
21+
jobs:
22+
# Runs for issues, pull requests and comments
23+
rs-gpt-review:
24+
name: rs-gpt-review comment
25+
# Only run the job if the comment contains @rs-gpt-review
26+
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') }}
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v3
30+
# The action will only run if the description or comments mentions @rs-gpt-review
31+
- uses: rootstrap/rs-gpt-review@v2
32+
name: rs-gpt-review
33+
with:
34+
github_token: ${{ secrets.GITHUB_TOKEN }}
35+
openai_key: ${{ secrets.OPENAI_KEY }}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: 'sonarqube'
2+
3+
on: push
4+
5+
jobs:
6+
sonarQubeTrigger:
7+
name: Sonarqube-Trigger
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: dart-lang/setup-dart@v1
11+
- name: Checkout code
12+
uses: actions/checkout@v2
13+
- name: Set up Flutter
14+
uses: subosito/flutter-action@v2
15+
with:
16+
channel: stable
17+
flutter-version: 3.22.3
18+
- run: flutter --version
19+
- name: Get Dependencies
20+
run: flutter pub get app && flutter pub get modules/domain && flutter pub get modules/data && flutter pub get modules/common
21+
- name: Analyze App
22+
#run analyze first
23+
run: flutter analyze
24+
- name: Setup Sonarqube Scanner
25+
uses: warchant/setup-sonar-scanner@v8
26+
- name: Run Sonarqube Scanner
27+
run: sonar-scanner
28+
-Dsonar.token=${{ secrets.SONAR_TOKEN }}
29+
-Dsonar.host.url=${{ secrets.SONAR_URL }}

.idea/flutter-base.iml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)