Skip to content

feat: skip PRs with CHANGES_REQUESTED review decision - #222

Merged
don-petry merged 2 commits into
mainfrom
feat/skip-changes-requested-and-ci
May 17, 2026
Merged

don-petry merged 2 commits into
mainfrom
feat/skip-changes-requested-and-ci

Conversation

@don-petry

Copy link
Copy Markdown
Collaborator

Summary

  • Adds reviewDecision to the initial gh pr view snapshot (same API call as headRefOid and statusCheckRollup — no extra cost)
  • Extracts and logs REVIEW_DECISION alongside the existing CI status line
  • Skips (exit 100) any PR where reviewDecision == CHANGES_REQUESTED — positioned after the CI guards so cheapest/broadest checks run first

Why

Reviewing a PR that already has "Changes Requested" from a human wastes tokens and produces confusing parallel feedback threads. The author needs to respond to existing feedback first; the bot re-engages after a new push (which resets the reviewDecision).

Not changed

CI skipping (failing/pending → exit 100) was already implemented in review-one-pr.sh — no changes needed there.

Test plan

  • Trigger workflow_dispatch with a PR URL that has an open "Changes Requested" review — confirm log shows skip: changes requested and the PR is counted as a no-op (not against MAX_PRS budget)
  • Trigger with a PR that has no review decision — confirm it proceeds normally through the cascade
  • Trigger with an approved PR — confirm REVIEW_DECISION=APPROVED is logged and no skip fires

🤖 Generated with Claude Code

Adds an early-exit check alongside the existing CI guards so the cascade
skips any PR where a human reviewer has already requested changes.
Reviewing those PRs before the author responds wastes tokens and creates
confusing parallel feedback threads.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 17, 2026 16:34
@coderabbitai

coderabbitai Bot commented May 17, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@don-petry has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 39 minutes and 19 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5cee8273-6ee0-4b37-a507-4363e2939bdb

📥 Commits

Reviewing files that changed from the base of the PR and between 752d694 and e028407.

📒 Files selected for processing (1)
  • scripts/review-one-pr.sh
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/skip-changes-requested-and-ci

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@don-petry

Copy link
Copy Markdown
Collaborator Author

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 275b8cb57e

ℹ️ 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".

Comment thread scripts/review-one-pr.sh Resolved
Comment thread scripts/review-one-pr.sh Resolved

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the scripts/review-one-pr.sh script to include the reviewDecision field when fetching pull request data. It adds logic to skip the review process if changes have already been requested, ensuring the script waits for an author response before proceeding. I have no feedback to provide as there were no review comments.

@don-petry

Copy link
Copy Markdown
Collaborator Author

No description provided.

…views

Two issues addressed from Codex P2 feedback:

1. FORCE_REVIEW bypass: mention-triggered and force_review=true runs now
   bypass the CHANGES_REQUESTED skip, so authors can explicitly request a
   re-review after addressing feedback.

2. Stale review guard: only skip when a CHANGES_REQUESTED review targets
   the current head SHA. On repos without automatic stale-review dismissal,
   reviewDecision stays CHANGES_REQUESTED after new commits — the cascade
   now re-engages when the author has pushed new work.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@don-petry

Copy link
Copy Markdown
Collaborator Author

No description provided.

@don-petry

Copy link
Copy Markdown
Collaborator Author

No description provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants