name: 'AI Code Reviewer (AiReviewPR)' description: 'Perform code review using openai API' author: kekxv inputs: repository: description: 'Repository name with owner. For example, actions/checkout' default: ${{ github.repository }} REVIEW_PULL_REQUEST: description: 'Whether to compare the records from the beginning of the commit to the latest one; false indicates that only the most recent commit will be reviewed. 是否比对提交开始到最新的记录,false表示只审核最新一次提交审核' default: false BASE_REF: description: 'github event pull_request base ref' default: ${{ github.event.pull_request.base.ref }} PULL_REQUEST_NUMBER: description: 'github event pull_request number' default: ${{ github.event.pull_request.number }} CHINESE: description: 'use chines 作废' default: "" LANGUAGE: description: 'use chines' default: "Chinese" token: description: > Personal access token (PAT) used to fetch the repository. The PAT is configured with the local git config, which enables your scripts to run authenticated git commands. The post-job step removes the PAT. We recommend using a service account with the least permissions necessary. Also when generating a new PAT, select the least scopes necessary. [Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets) default: ${{ github.token }} model: description: 'AI model to use for code review' required: true default: 'gemma2:2b' host: description: 'ollama host' required: true default: 'http://127.0.0.1:11434' PROMPT_GENRE: description: 'prompt genre' default: ' ' reviewers_prompt: description: 'ollama system prompt' required: false default: "" ai_token: description: 'ai token' required: false default: " " include_files: description: 'Comma-separated list of files to include review' required: false default: " " # 默认为空,表示不限制 exclude_files: description: 'Comma-separated list of files to exclude review' required: false default: " " # 默认为空,表示不传递文件 runs: using: node20 main: 'dist/index.js'