Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add llm reviewer #1016

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/on-comment-llm-reviewer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: LLM 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: Checkout Repo
uses: actions/checkout@v4
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/[email protected]

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'LLM Code Reviewer' step
Uses Step
uses 'truongnh1992/gemini-ai-code-reviewer' with ref '6.2.0', not a pinned commit hash
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
INPUT_EXCLUDE: "*.md,*.txt,package-lock.json,*.yml,*.yaml"
2 changes: 1 addition & 1 deletion .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,4 @@ jobs:
needs: [publish-dev]
with:
channel: ${{ needs.publish-dev.outputs.devChannel }}
secrets: inherit
secrets: inherit
Loading