Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Fixed Some Stuff 🧪🛠️ #13

Fixed Some Stuff 🧪🛠️

Fixed Some Stuff 🧪🛠️ #13

Workflow file for this run

name: 🔍 Code Check
on:
pull_request:
permissions:
contents: write
jobs:
ollama_review:
runs-on: ubuntu-latest
name: 🦙 Ollama Code Review Job
steps:
- name: ⬇️ Checkout Pull Request
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: ⬇️ Install Ollama
run: |
curl -fsSL https://ollama.com/install.sh | bash
ollama
ollama pull deepseek-coder-v2
- name: 🔍 Review Changed Files
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "" > Review.txt
for file in $(git diff --name-only origin/main); do
if [ -f "$file" ]; then
echo "❇️ Prompt: Review the following code: `$(cat -n $file | sed '10d')`"
modified_file_review=$(curl -s http://127.0.0.1:11434/api/generate -d '{"model": "deepseek-coder-v2", "prompt": "Review the following code: `$(cat $file)`", "stream": false}' | jq -r '.response')
Comment="Ollama Code Review for \`$file\`: $modified_file_review"
echo "$Comment" >> Review.txt
echo "$Comment"
else
echo "File $file does not exist."
fi
done
shell: bash