返回 CodeWhale
action.yml
根目录 / action.yml
1 name: Codewhale
2 description: Review pull requests automatically or on an authorized @codewhale review request, using your chosen model.
3 branding:
4 icon: code
5 color: blue
6 inputs:
7 version:
8 description: Exact released CLI tag (vX.Y.Z). Must support review --json.
9 required: true
10 provider:
11 description: Explicit BYOK provider (orcarouter, deepseek, anthropic, openrouter, zai, modelstudio-token-plan), or codewhale for a separately verified account machine key.
12 required: true
13 model:
14 description: Exact model ID. Account mode requires provider/model from the account catalog.
15 required: true
16 reasoning-effort:
17 description: Optional Engine reasoning setting (auto, off, low, medium, high, max).
18 github-token:
19 description: GitHub token with contents read and pull-requests read; legacy post:true also requires pull-requests write.
20 default: ${{ github.token }}
21 pr-number:
22 description: PR number for workflow_dispatch; pull_request events use the event snapshot.
23 trigger-phrase:
24 description: Bot mention used for a standalone @name review line in a new PR comment.
25 default: '@codewhale'
26 allow-forks:
27 description: Allow inert fork review only on a write-authorized issue_comment or manual run from the default branch.
28 default: 'false'
29 max-chars:
30 description: Maximum diff characters per complete pass.
31 default: '200000'
32 max-passes:
33 description: Maximum number of complete review passes.
34 default: '1'
35 max-output-tokens:
36 description: Optional per-pass output ceiling; at least 8192.
37 timeout-seconds:
38 description: Model and publication deadline, in seconds (30–1200).
39 default: '600'
40 post:
41 description: Legacy direct COMMENT publication. Set false to export findings for a separate publisher job.
42 default: 'true'
43 outputs:
44 outcome:
45 description: reviewed_clean, reviewed_with_findings, incomplete, superseded, not_eligible, configuration_missing, failed, or publication_uncertain.
46 value: ${{ steps.review.outputs.outcome }}
47 receipt:
48 description: Absolute path to the sanitized JSON execution receipt (also written on failures).
49 value: ${{ steps.review.outputs.receipt }}
50 findings:
51 description: Absolute path to validated findings JSON for a complete post:false review; contains repository-sensitive review text.
52 value: ${{ steps.review.outputs.findings }}
53 pr-url:
54 description: URL of the pull request, when resolved.
55 value: ${{ steps.review.outputs.pr-url }}
56 runs:
57 using: composite
58 steps:
59 - id: review
60 shell: bash
61 env:
62 CW_ACTION_PATH: ${{ github.action_path }}
63 CW_VERSION: ${{ inputs.version }}
64 CW_PROVIDER: ${{ inputs.provider }}
65 CW_MODEL: ${{ inputs.model }}
66 CW_REASONING_EFFORT: ${{ inputs.reasoning-effort }}
67 CW_PR_NUMBER: ${{ inputs.pr-number }}
68 CW_TRIGGER_PHRASE: ${{ inputs.trigger-phrase }}
69 CW_ALLOW_FORKS: ${{ inputs.allow-forks }}
70 CW_MAX_CHARS: ${{ inputs.max-chars }}
71 CW_MAX_PASSES: ${{ inputs.max-passes }}
72 CW_MAX_OUTPUT_TOKENS: ${{ inputs.max-output-tokens }}
73 CW_TIMEOUT_SECONDS: ${{ inputs.timeout-seconds }}
74 CW_POST: ${{ inputs.post }}
75 GH_TOKEN: ${{ inputs.github-token }}
76 run: node "$CW_ACTION_PATH/scripts/github-action/review.mjs"
77
77 lines YAML