Skip to content

AlexanderTar/nitpick-ai-action

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

Repository files navigation

Nitpick AI Action

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.

Features

  • 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

Inputs

This action accepts the following inputs:

github-token

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.

ai-model

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.

api-key

Provide the API key for the chosen AI model. This should be stored as a secret in your GitHub repository. This input is required.

strict

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.

ignore-patterns

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.

Usage

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"]'

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published