Add release and review workflow entry points#22
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 0 minutes and 6 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PR Review: Add release and review workflow entry pointsOverall this is a well-structured workflow with clear triage logic, good error handling, and thoughtful edge-case coverage. A few issues worth addressing: Bug:
|
| - After `f`, tell me the PR is merge-ready only when no `DISCUSS` items remain unresolved | ||
| - After `f+i`, tell me the PR is merge-ready | ||
| - After `m`, only tell me the PR is merge-ready when no must-fix items were deferred; otherwise explicitly say it is not merge-ready | ||
| - After direct selection, do not signal merge-ready automatically; first evaluate remaining `MUST-FIX`/`DISCUSS` items and ask whether to continue with `f`, `f+i`, `d`, `r`, or `m` |
There was a problem hiding this comment.
Same --input JSON vs. markdown issue
gh api ... -X POST --input <summary_body_file> requires the file to contain valid JSON (e.g. {"body": "..."}), but the template above writes plain markdown. This will fail at runtime.
Suggested fix:
gh api repos/${REPO}/issues/{PR_NUMBER}/comments -X POST -f body="$(cat <summary_body_file>)"Or JSON-encode the markdown with jq -Rs '{"body": .}' before passing it to --input.
|
|
||
| The format is based on [Keep a Changelog](http://keepachangelog.com/). Please use the existing headings and styling as a guide. | ||
| After a release, run `/update-changelog` in Claude Code to analyze commits, write entries, and create a PR. | ||
| Release and review helpers: |
There was a problem hiding this comment.
This navigation block (links to release scripts and review workflows) doesn't belong in a changelog — it's meta-documentation, not a record of changes. Readers scanning for version history will have to skip past it each time.
This content is already captured in the new Maintainer Automation section added to README.md in this same PR. Consider removing it from CHANGELOG.md to keep the file focused on change entries.
| printf 'Next default scan starts after this comment. Say `check all reviews` to rescan the full PR.\n' | ||
| } > "${summary_body_file}" | ||
|
|
||
| gh api repos/${REPO}/issues/${PR_NUMBER}/comments -X POST --input "${summary_body_file}" |
There was a problem hiding this comment.
Bug: --input expects JSON, not markdown
gh api --input sends the file as the raw HTTP body. The GitHub REST API POST /issues/{number}/comments requires JSON: {"body": "..."}. Sending plain markdown will produce a 422 Unprocessable Entity error.
The follow-up issue step correctly uses gh issue create --body-file (a high-level gh command that accepts raw markdown), but raw gh api calls need JSON.
| gh api repos/${REPO}/issues/${PR_NUMBER}/comments -X POST --input "${summary_body_file}" | |
| gh api repos/${REPO}/issues/${PR_NUMBER}/comments -X POST -f body="$(cat "${summary_body_file}")" |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7b12850987
ℹ️ 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".
| printf 'Next default scan starts after this comment. Say `check all reviews` to rescan the full PR.\n' | ||
| } > "${summary_body_file}" | ||
|
|
||
| gh api repos/${REPO}/issues/${PR_NUMBER}/comments -X POST --input "${summary_body_file}" |
There was a problem hiding this comment.
Post summary via
-f body= instead of raw --input
This step will fail when it tries to write the summary checkpoint comment: summary_body_file is plain markdown, but gh api --input sends that file as the entire HTTP body. For repos/{owner}/{repo}/issues/{issue_number}/comments, GitHub expects a JSON payload containing a body field, and the gh api manual examples use -f body='...' for this endpoint. As written, the summary post can error out, which breaks the new cutoff/checkpoint flow because no <!-- address-review-summary --> comment gets created.
Useful? React with 👍 / 👎.
Review: Add release and review workflow entry pointsThis PR is well-scoped — it's purely documentation and workflow prompts, with no runtime code changes. The new Duplication with no sync mechanism
Consider either:
|
| @@ -18,12 +21,19 @@ If this command fails, ensure `gh` CLI is installed and authenticated (`gh auth | |||
|
|
|||
| The user's input is: $ARGUMENTS | |||
|
|
|||
There was a problem hiding this comment.
The $ARGUMENTS variable is a Claude Code slash-command substitution — correct for both commands/ and .claude/commands/ paths. However, it's easy to confuse with the {{PR_REFERENCE}} placeholder used in .agents/workflows/address-review.md. A short comment here would prevent a contributor from accidentally "fixing" this to match the portable prompt:
| The user's input is: $ARGUMENTS | |
| @@ -1,5 +1,5 @@ | |||
| --- | |||
There was a problem hiding this comment.
This file is an exact mirror of .claude/commands/address-review.md. There's currently no mechanism to keep them in sync — a future edit to one won't automatically update the other. Consider adding a note here so contributors know to update both:
| --- | |
| --- | |
| description: Fetch GitHub PR review comments, triage them, post summary checkpoints, and resolve addressed threads | |
| --- | |
|
|
||
| The format is based on [Keep a Changelog](http://keepachangelog.com/). Please use the existing headings and styling as a guide. | ||
| After a release, run `/update-changelog` in Claude Code to analyze commits, write entries, and create a PR. | ||
| Release and review helpers: |
There was a problem hiding this comment.
These meta-documentation links are placed before ## [Unreleased], which is slightly outside the keepachangelog.com format used by the rest of this file. This works, but a reader might expect the release-notes section to start immediately after the header block. If the intent is permanent maintainer docs, a dedicated ## Maintenance or ## Notes heading would make the structure clearer.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix prepared fixes for both issues found in the latest run.
- ✅ Fixed: Two identical 491-line files with no sync mechanism
- Added a CI lint step in
.github/workflows/ci.ymlthat fails whencommands/address-review.mdand.claude/commands/address-review.mddiverge.
- Added a CI lint step in
- ✅ Fixed: Summary post uses
--inputwith non-JSON file content- Replaced the summary-comment POST examples to use
-f body="$(cat ...)"in both command files and the workflow prompt so the GitHub API receives valid JSON.
- Replaced the summary-comment POST examples to use
Or push these changes by commenting:
@cursor push 8518f187fc
Preview (8518f187fc)
diff --git a/.agents/workflows/address-review.md b/.agents/workflows/address-review.md
--- a/.agents/workflows/address-review.md
+++ b/.agents/workflows/address-review.md
@@ -171,7 +171,7 @@
- Mention whether the run used the default cutoff or the explicit `check all reviews` override.
- End with a note that future full-PR scans should start after this comment unless I say `check all reviews`.
- Use exact timestamps in the summary when referring to the scan window.
- - Post it with: `gh api repos/${REPO}/issues/{PR_NUMBER}/comments -X POST --input <summary_body_file>`
+ - Post it with: `gh api repos/${REPO}/issues/{PR_NUMBER}/comments -X POST -f body="$(cat <summary_body_file>)"`
11. Merge-ready signal:
- After `f`, tell me the PR is merge-ready only when no `DISCUSS` items remain unresolved
diff --git a/.claude/commands/address-review.md b/.claude/commands/address-review.md
--- a/.claude/commands/address-review.md
+++ b/.claude/commands/address-review.md
@@ -396,7 +396,7 @@
printf 'Next default scan starts after this comment. Say `check all reviews` to rescan the full PR.\n'
} > "${summary_body_file}"
-gh api repos/${REPO}/issues/${PR_NUMBER}/comments -X POST --input "${summary_body_file}"
+gh api repos/${REPO}/issues/${PR_NUMBER}/comments -X POST -f body="$(cat "${summary_body_file}")"
rm -f "${summary_body_file}"diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -39,6 +39,13 @@
- run: npm ci
- run: npx eslint .
- run: npx prettier --check .
-
- name: Verify address-review mirror stays synced -
run: | -
cmp -s .claude/commands/address-review.md commands/address-review.md || { -
echo "::error::commands/address-review.md is out of sync with .claude/commands/address-review.md" -
diff -u .claude/commands/address-review.md commands/address-review.md -
exit 1 -
}typecheck:
name: Type Check
diff --git a/commands/address-review.md b/commands/address-review.md
--- a/commands/address-review.md
+++ b/commands/address-review.md
@@ -396,7 +396,7 @@
printf 'Next default scan starts after this comment. Say check all reviews to rescan the full PR.\n'
} > "${summary_body_file}"
-gh api repos/${REPO}/issues/${PR_NUMBER}/comments -X POST --input "${summary_body_file}"
+gh api repos/${REPO}/issues/${PR_NUMBER}/comments -X POST -f body="$(cat "${summary_body_file}")"
rm -f "${summary_body_file}"
You can send follow-ups to this agent here.
|
|
||
| - Rate limiting: GitHub API has rate limits; if you hit them, wait a few minutes | ||
| - Private repos: Requires appropriate `gh` authentication scope | ||
| - GraphQL inner pagination: The `comments(first:100)` inside each review thread is hardcoded. Threads with >100 comments (rare) will have older comments truncated. The outer `reviewThreads` pagination is handled by `--paginate`. |
There was a problem hiding this comment.
Two identical 491-line files with no sync mechanism
Medium Severity
.claude/commands/address-review.md and commands/address-review.md are byte-for-byte identical (491 lines each) with no symlink, build step, or other mechanism to keep them in sync. The README even labels the latter a "command mirror." Any future bug fix or workflow improvement must be manually applied to both files, and drift between them is likely over time—leading to confusing behavioral differences depending on which entry point is invoked.
Additional Locations (1)
|
|
||
| gh api repos/${REPO}/issues/${PR_NUMBER}/comments -X POST --input "${summary_body_file}" | ||
| rm -f "${summary_body_file}" | ||
| ``` |
There was a problem hiding this comment.
Summary post uses --input with non-JSON file content
Medium Severity
The Step 10 snippet writes raw markdown to a temp file via printf, then posts it with gh api ... --input "${summary_body_file}". The --input flag sends file content as the raw HTTP body, but the GitHub comments API expects a JSON payload like {"body": "..."}. This would cause a 422 error. All other comment-posting steps in the file correctly use -f body="..." which constructs proper JSON. The file-based approach here needs to wrap content in JSON first, or use -f body="$(cat ...)" instead.



This PR imports the latest address-review workflow from react_on_rails and makes it available in three places: .claude/commands, commands, and .agents/workflows. It updates commands/address-review.md to the newer review-cutoff/checkpoint workflow and adds a portable prompt for Codex/ChatGPT use. It also adds a Maintainer Automation section to README with direct release/review commands and links. Finally, CHANGELOG now links directly to release docs/scripts and review workflow files so release and review handling is easier to discover.
Note
Low Risk
Low risk: documentation/workflow additions only, with no runtime code or production behavior changes.
Overview
Adds a portable
.agents/workflows/address-review.mdprompt plus a new.claude/commands/address-review.md, and updatescommands/address-review.mdto a newer/address-reviewworkflow that supports review cutoffs via<!-- address-review-summary -->, acheck all reviewsoverride, follow-up issue creation, and a quick-action menu for fixing/replying/resolving.Updates
README.mdandCHANGELOG.mdto link to the release scripts/docs and the new review-workflow entry points so maintainers can discover and run these helpers more easily.Written by Cursor Bugbot for commit ce1312c. This will update automatically on new commits. Configure here.