返回 CodeWhale
action.yml
根目录 / action.yml
1 name: Codewhale review
2 description: Review a pinned pull request with a checksummed Codewhale release and an explicit outcome receipt.
3 inputs:
4 version:
5 description: Exact released CLI tag (vX.Y.Z). Must support review --json.
6 required: true
7 provider:
8 description: codewhale for an account machine key, or an explicit BYOK provider.
9 default: codewhale
10 model:
11 description: Exact model ID. Account mode requires provider/model from the account catalog.
12 required: true
13 github-token:
14 description: GitHub token with contents read and pull-requests write.
15 default: ${{ github.token }}
16 pr-number:
17 description: PR number for workflow_dispatch; pull_request events use the event snapshot.
18 max-chars:
19 description: Maximum diff characters per complete pass.
20 default: '200000'
21 max-passes:
22 description: Maximum number of complete review passes.
23 default: '1'
24 max-output-tokens:
25 description: Optional per-pass output ceiling; at least 8192.
26 timeout-seconds:
27 description: Model and publication deadline, in seconds (30–1200).
28 default: '600'
29 post:
30 description: Publish a COMMENT review; never approve or request changes.
31 default: 'true'
32 outputs:
33 outcome:
34 description: reviewed_clean, reviewed_with_findings, incomplete, superseded, not_eligible, configuration_missing, failed, or publication_uncertain.
35 value: ${{ steps.review.outputs.outcome }}
36 receipt:
37 description: Absolute path to the sanitized JSON execution receipt (also written on failures).
38 value: ${{ steps.review.outputs.receipt }}
39 pr-url:
40 description: URL of the pull request, when resolved.
41 value: ${{ steps.review.outputs.pr-url }}
42 runs:
43 using: composite
44 steps:
45 - id: review
46 shell: bash
47 env:
48 CW_ACTION_PATH: ${{ github.action_path }}
49 CW_VERSION: ${{ inputs.version }}
50 CW_PROVIDER: ${{ inputs.provider }}
51 CW_MODEL: ${{ inputs.model }}
52 CW_PR_NUMBER: ${{ inputs.pr-number }}
53 CW_MAX_CHARS: ${{ inputs.max-chars }}
54 CW_MAX_PASSES: ${{ inputs.max-passes }}
55 CW_MAX_OUTPUT_TOKENS: ${{ inputs.max-output-tokens }}
56 CW_TIMEOUT_SECONDS: ${{ inputs.timeout-seconds }}
57 CW_POST: ${{ inputs.post }}
58 GH_TOKEN: ${{ inputs.github-token }}
59 run: node "$CW_ACTION_PATH/scripts/github-action/review.mjs"
60
60 lines YAML