Skip to content

zakerby/gh-code-review

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Github GenAI Code Review

This GitHub Action automates the process of code review by leveraging the Ollama language model. It checks out your code, installs Ollama, identifies modified files in a pull request, and uses Ollama to review those files. Finally, it posts the review comments to the pull request.

Features

  • Automatic Checkout: Checks out the codebase for review.
  • Ollama Installation: Installs the Ollama tool for code analysis.
  • Identify Modified Files: Detects files changed in the pull request.
  • Code Review with Ollama: Utilizes Ollama to review the modified files.
  • Post Review Comments: Automatically posts review comments to the pull request.

Usage

To use this action in your workflow, follow these steps:

  1. Create a Workflow File: In your repository, create a workflow file in the .github/workflows/ directory. For example, .github/workflows/ollama_review.yml.

  2. Configure the Workflow: Add the following content to your workflow file, adjusting the inputs as necessary:

name: Automated Ollama Code Review

on:
  pull_request:
    branches:
      - main

jobs:
  ollama_review:
    runs-on: ubuntu-latest
    name: Ollama Code Review Job
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v2

      - name: Ollama Code Review
        uses: ./.github/actions/ollama-code-review
        with:
          llm-model: 'codegemma'
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

About

A Github action to perform code review using Ollama

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors