- add gitea cli install step
Some checks failed
Ollama Review / test-action (pull_request) Successful in 46s
continuous-integration/drone/push Build is failing

This commit is contained in:
oonyeje 2025-03-07 15:32:45 -05:00
parent 333d87c62f
commit 788781d077

View File

@ -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