English | 中文
An action powered by cr-asst that reviews your pull requests with AI assistants.
-
Create a workflow file
.github/workflows/review-pr.ymlwith the following content:name: Review PR on: pull_request: types: - opened - synchronize branches: - main jobs: review: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 - name: Review uses: mys1024/cr-asst-action@v2 with: github-token: ${{ secrets.GITHUB_TOKEN }} # required model: gpt-4 # required api-key: ${{ secrets.CR_API_KEY }} # required provider: openai # optional, defaults to "openai", options: "openai", "deepseek", "xai", "anthropic", "google" base-url: https://api.example.com/v1 # optional exclude: 'foo,bar/dir' # optional, defaults to "package-lock.json,pnpm-lock.yaml,yarn.lock" prompt-file: 'my-prompt.md' # optional, defaults to the builtin prompt "en" output-file: 'review-result.md' # optional
Note: see action.yml for more details about inputs.
-
Set the secret
CR_API_KEYin your repository settings. -
Set the setting
Workflow permissionstoRead and write permissionsin your repository settings.
Click here to see the example.
MIT License © 2025-PRESENT mys1024