Skip to content

Commit

Permalink
Test pull request (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderTar authored Aug 10, 2024
1 parent 4e5962b commit 58a07ab
Show file tree
Hide file tree
Showing 6 changed files with 206 additions and 29 deletions.
Binary file removed .DS_Store
Binary file not shown.
21 changes: 21 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
on:
pull_request:
types: [opened, reopened, synchronize]

jobs:
test:
runs-on: ubuntu-latest
name: Nitpick AI Review
permissions:
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Nitpick AI Review
uses: ./ # Uses an action in the root directory
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
ai-model: claude-3.5-sonnet
api-key: ${{ secrets.CLAUDE_API_KEY }}
strict: false
ignore-patterns: '["*.md", ".gitignore", ".github/workflows/main.yml"]'
47 changes: 47 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# OS generated files
.DS_Store
Thumbs.db

# Editor/IDE specific
.vscode/
.idea/
*.swp
*.swo

# Dependency directories
node_modules/
vendor/

# Compiled output
dist/
build/
*.class
*.pyc

# Logs and databases
*.log
*.sqlite

# Environment variables
.env
.env.local

# Package files
*.jar
*.war
*.ear

# Temporary files
*.tmp
*~

# Build tools
.gradle/
.maven/

# Testing
coverage/

# Miscellaneous
*.bak
*.cache
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,23 @@ Provide the API key for the chosen AI model. This should be stored as a secret i

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:

```yaml
- 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"]'
```
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ inputs:
description: "GitHub token for posting reviews"
required: true
ai-model:
description: "AI model to use for the review. Accepted values are: claude-3.5-sonnet, gpt-3.5, gpt-4o"
description: "AI model to use for the review. Accepted values are: claude-3.5-sonnet (recommended) and gpt-3.5"
required: true
default: "claude-3.5-sonnet"
api-key:
Expand All @@ -20,6 +20,10 @@ inputs:
description: "Whether to request changes or post review as a comment"
required: false
default: "false"
ignore-patterns:
description: "Array of glob patterns for files to ignore"
required: false
default: '[]'

branding:
icon: 'zap'
Expand Down
Loading

0 comments on commit 58a07ab

Please sign in to comment.