-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4e5962b
commit 58a07ab
Showing
6 changed files
with
206 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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"]' | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.