To make it easier to integrate opencode for code review, I built a GitHub Action repository. Working with opencode to implement this was straightforward.
Currently, it provides two main features: one is review, and the other is using the runner to execute opencode (directly running opencode’s prompts on the runner) to handle other functionalities. For example, modifying code, creating new issues, creating PRs based on issues, etc.
How stable is it?
- This repository has been validated across multiple projects, and the release version is reliable.
- However, note that the main branch version is a rapidly iterating version.
How to integrate?
Add the following to your .github/workflows/opencode-review.yml:
| |
Currently, this action mainly supports Z.AI, ZHIPU, and OPENCODE GO subscriptions. Therefore, if using ZHIPU, simply add your ZHIPU_API_KEY to the project’s secrets. If using the opencode go subscription, you need to add OPENCODE_GO_API_KEY.
Everything else can use the default configuration. The default model is zhipuai-coding-plan/glm-5-turbo. For more configuration requirements, I recommend checking the original repository’s README.
I previously covered this quick review script in my code review article.
Differences
Actually, opencode has its own actions, so why did I build another one?
The differences from the official version are mainly reflected in several aspects:
| Feature | Upstream Status | This Repository |
|---|---|---|
| Model default fallback | Only required input | Three-level fallback (input → MODEL_NAME → hardcoded default) |
| Provider convenience fields | None | zhipu-api-key, opencode-go-api-key, etc. |
| Review prompt template | None | Chinese-formatted review (mergeable/conditionally mergeable/not mergeable) |
| Retry logic | None | attempts / retry-profile / retry-on-regex / retry-delay |
| Execution timeout | None | timeout-seconds |
| Version check | None | OPENCODE_MIN_VERSION |
| Installation retry | None | install-attempts |
| XDG cache caching | Only caches bin | Caches both bin + XDG cache |
Detailed explanations are available in sun-praise/opencode-actions#29.
Review effectiveness
You can see the results from the repo’s own PR at opencode-actions#30
The effect looks like this:

Future
- Try integrating gemini cli. Google’s GEM 3.1 PRO model currently offers great value for money, with the highest intelligence per unit.
- Integrate MCP plugin functionality. If MCP is available during opencode review, it may bring better review results.
- Integration of commercial plugin features
