Nitpick AI Action is a GitHub Action that performs automated code reviews using AI models. It analyzes pull requests, provides detailed feedback, and helps maintain code quality.
- Supports multiple AI models: Claude 3.5 Sonnet and GPT-3.5
- Generates line-by-line comments on code changes
- Provides an overall summary of the pull request
- Configurable to either request changes or post comments
- Easy integration with GitHub workflows
This action accepts the following inputs:
This input is required and should be set to ${{ secrets.GITHUB_TOKEN }}
. This token is used to authenticate and post reviews on the pull request.
Specify which AI model to use for the code review. The following options are available:
claude-3.5-sonnet
: Anthropic's Claude 3.5 Sonnet model (default)gpt-3.5
: OpenAI's GPT-3.5 model
This input is required.
Provide the API key for the chosen AI model. This should be stored as a secret in your GitHub repository. This input is required.
Set this to true
if you want the action to request changes on the pull request. If set to false
(default), the action will post the review as a comment. This input is optional.
This input is an array of glob patterns for files to ignore during the code review. It is optional and defaults to an empty array.
To use Nitpick AI Action in your GitHub workflow, add the following step to your GitHub workflow file:
- name: Nitpick AI Review
uses: actions/[email protected]
permissions:
pull-requests: write
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
api-key: ${{ secrets.AI_API_KEY }}
ai-model: 'claude-3.5-sonnet'
strict: false
ignore-patterns: '["*.md", "test/**/*.js"]'