- add gitea cli install step
This commit is contained in:
parent
333d87c62f
commit
788781d077
@ -19,11 +19,15 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.token }}
|
GITEA_TOKEN: ${{ secrets.token }}
|
||||||
run: |
|
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
|
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')
|
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"
|
comment="Ollama Code Review for \`$file\`:\n\n$review"
|
||||||
echo "$comment" >> ollama_review.txt
|
echo "$comment" >> ollama_review.txt
|
||||||
done
|
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
|
shell: bash
|
||||||
Loading…
x
Reference in New Issue
Block a user