name: PR Agent on: pull_request: types: [opened, reopened, ready_for_review, synchronize] issue_comment: types: [created, edited] jobs: pr_agent_job: # 只在主仓库运行,Fork 仓库直接跳过 if: | github.repository == 'huangxd-/danmu_api' && github.event.sender.type != 'Bot' runs-on: ubuntu-latest permissions: issues: write pull-requests: write contents: write steps: - name: PR Agent action step uses: the-pr-agent/pr-agent@main env: OPENAI_KEY: ${{ secrets.OPENAI_KEY }} OPENAI.API_BASE: ${{ vars.OPENAI_API_BASE }} config.model: ${{ vars.PR_AGENT_MODEL }} config.custom_model_max_tokens: "128000" GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} github_action_config.auto_review: "true" github_action_config.auto_describe: "true" github_action_config.auto_improve: "false"