Repository navigation
Conversation
The org ruleset requests a Copilot review on each push, and the reviews use AI units. This workflow requests a new review on each push until the PR has 3 Copilot reviews. Then it posts 1 comment that tells the author to test the change locally.
baelter
marked this pull request as ready for review
November 11, 2026 08:57
There was a problem hiding this comment.
🟡 Changes recommended
The workflow has active correctness issues that can block fork pull requests and fail to request or announce review-cap behavior on key events.
3 open issues
What changed in this PR
This pull request adds a GitHub Actions workflow that limits automatic Copilot code-review requests to three per pull request and posts guidance when the cap is reached.
Changes:
- Handles pull request events with concurrency control and draft-pull-request checks.
- Counts reviews from the Copilot reviewer bot and requests additional reviews below the limit.
- Posts a marker-based notification after the review cap is reached.
| File | Description |
|---|---|
| .github/workflows/copilot-review-cap.yml | Defines the workflow for counting Copilot reviews, requesting reviews below the cap, and posting a cap notification. |
Review effort: Lite
Comment on lines
+5
to
+7
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened, ready_for_review] |
| - name: Request a Copilot review or ask the author to work locally | ||
| run: | | ||
| set -euo pipefail | ||
| if [[ "$ACTION" != "synchronize" || "$DRAFT" == "true" ]]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Background
Copilot code review uses AI units, and the organization uses more than the plan includes. The org ruleset "Automatic Copilot code review" requests a new review on each push. One pull request got 9 reviews in 2 days. Many reviews after the third find few new problems.
Summary
This change adds the workflow
copilot-review-cap.yml. An org ruleset will run it on all repositories as a required workflow.Rollout
review_on_pushto false in the org ruleset.