Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ignore patterns and add include patterns #168

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ max_tokens=
TARGET_LABEL=
MAX_PATCH_LENGTH=
PROMPT=Below there is a code diff please help me do a code review
IGNORE_PATTERNS=/node_modules,*.md # Regex pattern to ignore files, separated by comma
IGNORE_PATTERNS=/node_modules,*.md # glob pattern or regex pattern to ignore files, separated by comma
INCLUDE_PATTERNS=*.js,*.ts # glob pattern or regex pattern to include files, separated by comma
anc95 marked this conversation as resolved.
Show resolved Hide resolved
21 changes: 21 additions & 0 deletions .github/workflows/cr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Code Review

permissions:
contents: read
pull-requests: write

on:
pull_request:
types: [opened, reopened, synchronize]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: anc95/ChatGPT-CodeReview@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
LANGUAGE: Chinese
OPENAI_API_ENDPOINT: https://api.bianxie.ai/v1
LOG_LEVEL: debug
anc95 marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ jobs:
temperature: 1 # https://platform.openai.com/docs/api-reference/chat/create#chat/create-temperature
max_tokens: 10000
MAX_PATCH_LENGTH: 10000 # if the patch/diff length is large than MAX_PATCH_LENGTH, will be ignored and won't review. By default, with no MAX_PATCH_LENGTH set, there is also no limit for the patch/diff length.
IGNORE_PATTERNS: /node_modules,*.md # Regex pattern to ignore files, separated by comma
IGNORE_PATTERNS=/node_modules,*.md # glob pattern or regex pattern to ignore files, separated by comma
INCLUDE_PATTERNS=*.js,*.ts # glob pattern or regex pattern to include files, separated by comma

# IF you are using azure openai
AZURE_API_VERSION: xx
anc95 marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
Loading