Skip to content

Conversation

@fiverr-sourcegraph
Copy link

Adds AI-powered code review that analyzes PR diffs and posts inline comments.

What's Added

  • Workflow at .github/workflows/ai-review.yaml
  • Triggers: opened, reopened, ready_for_review (not on new commits)

Workflow Parameters

post_severity (string)

Minimum severity level to post as GitHub comments.

Value Default Posts
critical 🚨 Security vulnerabilities, definite bugs
warning 🚨 + ⚠️ Likely bugs, performance issues
info 🚨 + ⚠️ + ℹ️ Minor suggestions

exclude_patterns (string - JSON array)

File patterns to exclude from AI review.

Pattern Matches
*.gql GraphQL files
*.md Markdown files
*.lock Lock files
dist/ Build directories
node_modules/ Dependencies

Default: '["*.gql", "*.md", "*.lock", "dist/", "node_modules/"]'

max_comments (number)

Maximum comments per review, sorted by severity (top N).

Default: 5

Usage

Minimal - Critical issues only (default)
jobs:
  ai-review:
    uses: fiverr/github_workflows/.github/workflows/ai_pr_review.yaml@master
    secrets: inherit
Warnings - Post warnings and critical issues
jobs:
  ai-review:
    uses: fiverr/github_workflows/.github/workflows/ai_pr_review.yaml@master
    with:
      post_severity: warning
    secrets: inherit
Custom exclusions - Add generated files to exclusions
jobs:
  ai-review:
    uses: fiverr/github_workflows/.github/workflows/ai_pr_review.yaml@master
    with:
      exclude_patterns: '["*.gql", "*.md", "*.lock", "*.generated.ts", "vendor/"]'
    secrets: inherit
Full config - All options
jobs:
  ai-review:
    uses: fiverr/github_workflows/.github/workflows/ai_pr_review.yaml@master
    with:
      post_severity: info
      max_comments: 10
      exclude_patterns: '["*.gql", "*.md", "*.lock"]'
    secrets: inherit

Created by Sourcegraph batch change shuchz/AI-review-github-workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants