DEV Community

Louis Liu
Louis Liu

Posted on

AI Code Review Supports DeepSeek Now

In my previous post, I introduced a tool that enables AI to perform code reviews. Now, this tool has been enhanced to support DeepSeek.

To use it, simply add a GitHub workflow to your repository by creating a YAML file as shown below:

# .github/workflows/pr-code-review.yml

name: Code Review
permissions:
  contents: read
  pull-requests: write
on:
  pull_request:
    types: [opened, synchronize, labeled]
jobs:
  code-review:
    runs-on: ubuntu-latest
    steps:
      - uses: Louis-7/ai-code-review@development
        env:
          ENGINE: 'deepseek'
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          DEEPSEEK_BASE_URL: 'https://api.deepseek.com'
          DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}
          CHAT_GPT_MODEL: 'deepseek-chat' # or deepseek-reasoner
          PATH_TO_EXCLUDE: action/**/*, package-lock.json, package.json
          MAX_FILE_PER_PR: 20
          LANGUAGE: ${{ vars.LANGUAGE}}
          CUSTOMIZED_PROMPT: ${{ vars.CUSTOMIZED_PROMPT }}
Enter fullscreen mode Exit fullscreen mode

You’ll also need to obtain a DeepSeek API key and add it to your repository secrets.

GitHub repository secrets

Once everything is set up, AI will automatically review your code whenever you create a pull request.

Top comments (0)