Thanks to visit codestin.com
Credit goes to docs.qoder.com

Skip to main content
Qoder Action is a standard GitHub Actions component that brings the powerful capabilities of Qoder CLI into your GitHub workflow, enabling intelligent code collaboration directly within PRs and Issues. With simple configuration, you can run Qoder CLI on GitHub Actions Runners to provide your team with two core out-of-the-box capabilities: automated PR reviews and @qoder interactive collaboration. Visit Qoder Action Repository →

Key Features

  • Automated PR Reviews: Every pull request automatically receives a comprehensive code review, detecting code defects, security vulnerabilities, test coverage gaps, and other issues—improving code quality before merging
  • @qoder On-Demand Assistance: Mention @qoder in any comment to get code explanations, implementation suggestions, or direct fixes
  • Deep Project Understanding: Respects your project’s coding standards, architectural patterns, and business logic
  • Quick Setup: Complete configuration in minutes and immediately boost team efficiency
  • Secure and Reliable: Code runs on GitHub Runners, ensuring data security

Quick Start

Run the /setup-github command in qodercli and follow the guided setup.

Option 2: Manual Setup

1. Install GitHub App and Get Access Token

  1. Visit Qoder Integrations
  2. Link your Qoder account with your GitHub account and install the qoderai GitHub App to your target repository
  3. Generate a Qoder Personal Access Token
Note: If you previously installed qoderai, visit the GitHub App installation list to check if qoderai has any permission upgrade requests. If so, please grant the necessary permissions.

2. Add Qoder Access Token to Repository Secrets

In your repository, go to Settings > Secrets and variables > Actions and add QODER_PERSONAL_ACCESS_TOKEN with your Qoder Personal Access Token.

3. Select and Install Workflow

Visit Qoder Action examples, choose a workflow that fits your needs, and copy it to your repository’s .github/workflows/ directory.
  • Code Review: Automatically analyzes pull request code quality, test coverage, and security issues
  • Assistant: Enables interactive conversations (@qoder) in Issues and PRs to explain code or fix problems

4. Start Using

  • Code Review: Create a new pull request and wait for Qoder’s feedback
  • Assistant: Comment @qoder explain this code or @qoder fix this issue in any Issue or PR

Best Practices

Customize Output Language

Specify the output language in the prompt:
- name: Run Qoder Code Review
  uses: QoderAI/qoder-action@v0
  with:
    qoder_personal_access_token: ${{ secrets.QODER_PERSONAL_ACCESS_TOKEN }}
    prompt: |
      /review-pr
      REPO:${{ github.repository }} PR_NUMBER:${{ github.event.pull_request.number }}
      OUTPUT_LANGUAGE: Chinese

Define Review Rules Using Agents.md

Create an Agents.md file in your repository root. Qoder CLI will automatically load its content as context:
# Project Code Review Guidelines

## Review Focus
- All database queries must use parameterized queries; string concatenation is prohibited
- API endpoints must include authorization checks
- Sensitive information (passwords, tokens) must not be hardcoded or logged
- All external input must be validated and sanitized

## Checks to Ignore
- Code duplication checks in test files (`*.test.js`, `*.spec.ts`)
- Code style issues in auto-generated files (`generated/`, `dist/`)
- Complexity warnings in mock data files

## Team Conventions
- Use async/await instead of Promise.then()
- Component names use PascalCase
- Utility functions use camelCase
- Constants use UPPER_SNAKE_CASE

Skip Reviews Based on PR Size

For large PRs, you can add skip conditions to avoid excessive credit consumption:
steps:
  - name: Check PR Size
    id: check_size
    run: |
      # Get the number of lines added in the PR
      LINES_CHANGED=$(jq .pull_request.additions < $GITHUB_EVENT_PATH)
      echo "Lines changed: $LINES_CHANGED"

      # Skip review if over 500 lines to control costs
      if [ "$LINES_CHANGED" -gt 500 ]; then
        echo "skip=true" >> $GITHUB_OUTPUT
      else
        echo "skip=false" >> $GITHUB_OUTPUT
      fi

  - uses: QoderAI/qoder-action@v0
    if: steps.check_size.outputs.skip == 'false'  # Only execute if PR size is within threshold
    # ... other configuration
For more configuration examples, visit the Recipes documentation for complete configuration examples and best practices.

Technical Support