feature/Appointment-Booking #2
@ -19,11 +19,15 @@ jobs:
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.token }}
|
||||
run: |
|
||||
curl -o gitea https://dl.gitea.io/gitea-cli/1.5.0/linux-amd64/gitea
|
||||
chmod +x gitea
|
||||
./gitea --version
|
||||
|
||||
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"
|
||||
echo "$comment" >> ollama_review.txt
|
||||
done
|
||||
|
||||
gitea pr comment ${{ gitea.event.pull_request.number }} --body "$(cat ollama_review.txt)"
|
||||
./gitea pr comment ${{ gitea.event.pull_request.number }} --body "$(cat ollama_review.txt)"
|
||||
shell: bash
|
||||
Loading…
x
Reference in New Issue
Block a user