[Chore/sonarqube] - 소나큐브 정적검사 플러그인 추가 #37
This file contains hidden or 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
| name: Gemini AI Code Reviewer | |
| on: | |
| issue_comment: | |
| types: [created] | |
| permissions: write-all | |
| jobs: | |
| gemini-code-review: | |
| runs-on: ubuntu-latest | |
| if: | | |
| github.event.issue.pull_request && | |
| contains(github.event.comment.body, '/gemini-review') | |
| steps: | |
| - name: PR Info | |
| run: | | |
| echo "Comment: ${{ github.event.comment.body }}" | |
| echo "Issue Number: ${{ github.event.issue.number }}" | |
| echo "Repository: ${{ github.repository }}" | |
| - name: Checkout Repo | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get PR Details | |
| id: pr | |
| run: | | |
| PR_JSON=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.issue.number }}) | |
| echo "head_sha=$(echo $PR_JSON | jq -r .head.sha)" >> $GITHUB_OUTPUT | |
| echo "base_sha=$(echo $PR_JSON | jq -r .base.sha)" >> $GITHUB_OUTPUT | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: truongnh1992/gemini-ai-code-reviewer@main | |
| with: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} | |
| GEMINI_MODEL: gemini-1.5-pro-002 # Optional, default is `gemini-1.5-flash-002` | |
| EXCLUDE: "*.md,*.txt,package-lock.json,*.yml,*.yaml" |