Stop /review-pr from posting duplicate PR reviews#11
Conversation
The OpenCode GitHub integration (opencode github run) already posts the agent's final response to the PR as opencode-agent[bot]. The bundled /review-pr command was also instructing the agent to call GitHub write APIs directly (gh api .../reviews, gh pr comment fallback), producing an additional github-actions[bot] review/comment. Make /review-pr output-only so a review run yields a single OpenCode posting from opencode-agent[bot]: - .opencode/commands/review-pr.md: replace the posting section with an output-only policy (return one concise markdown response; do not call gh api, gh pr review, or gh pr comment). Reword anchoring to validate file:line references; keep normalization, dedup, severity grouping, and diff validation. Keep file:line references in the summary body. - .opencode/skills/review-pr/SKILL.md: mirror the same policy; remove Review API, inline-comment, and fallback posting sections; update workflow integration wording. - README.md: document that /review-pr produces one OpenCode PR comment via opencode-agent[bot], not a separate github-actions[bot] review.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce9a329435
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Include GITHUB_TOKEN in curl request when fetching the latest OpenCode release from GitHub API. This improves API rate limit handling and allows authenticated requests when the token is available. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
|
Reviewed 4 changed files across documentation accuracy, project guideline compliance, and security. Important (2)
Suggestions (1)
Verification note
|
Problem
A
/review-prrun produced two PR postings: anopencode-agent[bot]summary (from theopencode github runintegration, which already posts the agent final response) and an additionalgithub-actions[bot]review/comment, because the bundled command instructed the agent to call GitHub write APIs directly viagh api .../pulls/$PR_NUMBER/reviews(with agh pr commentfallback).Change
Make
/review-proutput-only so a review run yields a single OpenCode posting fromopencode-agent[bot]..opencode/commands/review-pr.md— replace the posting section with an output-only policy: return one concise markdown review response; do not callgh api,gh pr review, orgh pr comment. The surroundingopencode github runintegration posts the final response. Reword the anchoring step to validatefile:linereferences against the diff. Kept finding normalization, deduplication, severity grouping, and diff validation; keptfile:linereferences in the summary body so the single OpenCode comment stays actionable..opencode/skills/review-pr/SKILL.md— mirror the same policy; remove the Review API, inline-comment, and fallback posting sections; update workflow integration wording.README.md— document that/review-prproduces one OpenCode PR comment viaopencode-agent[bot], not a separategithub-actions[bot]review; drop theissues: writefallback requirement.Inputs / outputs / secrets
No action inputs, outputs, or secret requirements changed.
Verification
npx -y prettier --write ./\*\*/\*.md— clean.agents/skills/local-qa/scripts/validate-opencode.sh— OK: agent frontmatter and review-pr references validqa.sh: prettier, yamllint, shellcheck, zizmor, actionlint, checkov, validate-opencode) passed via the pre-push hookAcceptance
/review-prno longer instructs the agent to call GitHub write APIs directly.opencode-agent[bot], not both agithub-actions[bot]review and anopencode-agent[bot]summary.