alibaba/OpenCodeReview PR Review
AI-powered GitHub PR review with inline comments, sticky summary, and incremental non-destructive posting.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Jul 10, 2026
- License
- Apache 2.0
Pinned Snippet
uses: alibaba/open-code-review@802af6b461d17408856fac0d07a18f9b17d6d38c # v1.7.7tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| llm_url | LLM API endpoint URL (mapped to env OCR_LLM_URL). | yes | — |
| llm_auth_token | LLM auth token (mapped to env OCR_LLM_TOKEN). | yes | — |
| llm_model | Model name (mapped to env OCR_LLM_MODEL). | yes | — |
| llm_use_anthropic | 'true' for Anthropic Claude, 'false' for OpenAI-compatible APIs (mapped to env OCR_USE_ANTHROPIC). Required to force an explicit choice. | yes | — |
| llm_auth_header | Custom auth header name (mapped to env OCR_LLM_AUTH_HEADER). | no | — |
| llm_extra_headers | Extra headers "K=V,K=V" (mapped to env OCR_LLM_EXTRA_HEADERS). | no | — |
| llm_extra_body | extra_body JSON for LLM requests. No env var exists for this, so it is written via `ocr config set llm.extra_body`. | no | {"thinking": {"type": "disabled"}} |
| language | Review output language, written via `ocr config set language` (e.g. English, 中文). No env var exists for this. | no | English |
| llm_timeout | LLM request timeout in seconds (mapped to env OCR_LLM_TIMEOUT). | no | — |
| github_token | GitHub token used to post review comments. | no | ${{ github.token }} |
| ocr_version | npm version spec for @alibaba-group/open-code-review. | no | latest |
| review_concurrency | Value passed to `ocr review --concurrency`. | no | — |
| background | Value passed to `ocr review --background`. | no | — |
| rule | Path to a custom rules JSON file passed to `ocr review --rule`. | no | — |
| upload_artifacts | Upload raw JSON result and stderr as workflow artifacts. Must be the literal string 'true' or 'false' (quoted); the step gates on a string comparison, so an unquoted YAML boolean will not match. | no | true |
| sticky_summary | Summary dimension. true = update an existing summary comment in place (sticky) instead of posting a new one each run. | no | true |
| incremental | Incremental dimension. true = only append inline comments whose (path, line range) does not overlap an existing bot review comment. History is never deleted (non-destructive). | no | false |
| incremental_overlap_threshold | IoU (intersection-over-union) threshold used by incremental mode to decide whether a new multi-line comment overlaps an existing one. Two single-line comments match when on the same line; single- vs multi-line never match. Value in (0, 1]; ignored unless incremental is true. | no | 0.6 |
| base_ref | Override the base ref. Provide this (and head_sha) when invoking from a non-PR event such as issue_comment. | no | — |
| head_sha | Override the head commit SHA (use with base_ref for comment triggers). | no | — |
| node_version | Node.js version for actions/setup-node. | no | 24 |
Outputs
| name | description |
|---|---|
| comments_total | Total number of review comments generated by OCR. |
| comments_inline | Number of inline comments successfully posted. |
| comments_skipped | Number of inline comments skipped by incremental mode (overlap with history). |
| comments_failed | Number of inline comments that failed to post. |
| summary_comment_url | URL of the posted/updated summary comment, if any. |