feat: AI code review using ollama and qwen3:14b #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR : Ollama Model Setup and AI code Review with qwen3:14B using GitHub Action
This workflow automates code review for pull requests using the Ollama LLM and the
qwen3:14bmodel. It fetches the PR diff, sends it to the LLM for review, and posts the review as a comment on the PR.📋 Workflow Overview
qwen3:14bmodel.🔍 Example PR Review
qwen3:14b🛠️ Key Features
🧩 Workflow Table
actions/checkout@v4curl -fsSL https://ollama.com/install.sh | shollama serve,ollama pull qwen3:14bgit diff origin/${{ github.base_ref }}...HEADollama run qwen3:14bawkscriptcat ollama_clean_review.txtactions/github-script@v6kill $OLLAMA_PIDcat pr_diff.txt📝 How It Works
qwen3:14bmodel is pulled.🛡️ Permissions
contents: readpull-requests: writeissues: write🧩 Requirements
🖼️ Mermaid Diagram
flowchart TD A[Start: PR Opened] --> B[Checkout Repository] B --> C[Install Ollama] C --> D[Start Ollama & Pull Model] D --> E[Get PR Diff] E --> F{Diff Exists?} F -- Yes --> G[Review PR with Ollama] G --> H[Remove LLM Thinking Process] H --> I[Set Review Output] I --> J[Create PR Comment] J --> K[Stop Ollama Service] F -- No --> K K --> L[Show Diff File] L --> M[End]