feature/Appointment-Booking #2
@ -5,7 +5,7 @@ on:
|
||||
types: [opened, synchronize] # PR open시 자동 코드 리뷰 요청
|
||||
|
||||
jobs:
|
||||
test-action:
|
||||
review-code-with-llm:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
@ -15,14 +15,15 @@ jobs:
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v43
|
||||
|
||||
- name: Review code
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.token }}
|
||||
- name: Setup Gitea CLI
|
||||
run: |
|
||||
curl -o gitea https://dl.gitea.io/gitea-cli/1.5.0/linux-amd64/gitea
|
||||
chmod +x gitea
|
||||
./gitea --version
|
||||
|
||||
- name: Review code
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.token }}
|
||||
run: |
|
||||
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
|
||||
review=$(curl -s https://ollama.bsidesolutions.net/api/generate -d '{"model": "${{ inputs.model }}", "prompt": "Review the following file:\n\n```\n$(cat $file)\n```", "stream": false}' | jq -r '.response')
|
||||
comment="Ollama Code Review for \`$file\`:\n\n$review"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user