-
-
Notifications
You must be signed in to change notification settings - Fork 325
Fix check-peer-review workflow blocking Dependabot auto-merge #5390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Updated conditions to check for peer review by modifying the actor checks to use pull request user login instead.
|
👋 Hi @S3DFX-CYBER! This pull request needs a peer review before it can be merged. Please request a review from a team member who is not:
Once a valid peer review is submitted, this check will pass automatically. Thank you! |
WalkthroughAdds an early exit that skips peer-review processing for Dependabot PR authors and consolidates multiple actor exclusions into a single negated contains check; core review-fetching and labeling logic remains unchanged. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro Knowledge base: Disabled due to 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
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 |
📊 Monthly LeaderboardHi @S3DFX-CYBER! Here's how you rank for January 2026:
Leaderboard based on contributions in January 2026. Keep up the great work! 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/check-peer-review.yml (1)
56-61: Fix indentation for better readability.The defensive check logic is correct and appropriate. However, lines 59-60 should be indented by 2 additional spaces to clearly indicate they are inside the
ifblock, consistent with the indentation style used elsewhere in the script.🔎 Proposed fix for indentation
# Skip Dependabot PRs entirely (defense in depth) if [[ "$PR_AUTHOR" == "dependabot[bot]" || "$PR_AUTHOR" == "dependabot-preview[bot]" ]]; then - echo "Dependabot PR detected. Skipping peer review check." - exit 0 + echo "Dependabot PR detected. Skipping peer review check." + exit 0 fi
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (1)
.github/workflows/check-peer-review.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Run Tests
- GitHub Check: docker-test
🔇 Additional comments (1)
.github/workflows/check-peer-review.yml (1)
29-31: The condition is correct. Bothpull_request_targetandpull_request_reviewevents include thepull_requestobject in their payload, sogithub.event.pull_request.user.loginis available for both event types and will correctly exclude Dependabot PRs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
♻️ Duplicate comments (1)
.github/workflows/check-peer-review.yml (1)
30-34: Clarification regarding past review comment.The past review comment suggests that DonnieBLT and copilot accounts will now incorrectly run the job. However, examining the current code:
- Line 33 explicitly excludes
github.actor != 'DonnieBLT'- Line 34 excludes copilot accounts with
!contains(github.actor, 'copilot')Both automation accounts are still excluded at the job level. The change at line 34 simply generalizes the copilot check from explicit username exclusions to a pattern-based check, which is actually more robust. The concerns raised in the past comment are not applicable to the current code state.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (1)
.github/workflows/check-peer-review.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Run Tests
- GitHub Check: docker-test
Nachiket-Roy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
would like a peer-review @e-esakman or @rahulnegi20 any reviewer |
e-esakman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
|
After all reviews, i request @DonnieBLT to review this pr as it is ready for merge |
Summary
This PR fixes a regression where the
check-peer-reviewworkflow incorrectly runs on Dependabot pull requests and applies theneeds-peer-reviewlabel, blocking the auto-merge process.Root Cause
The workflow was relying on
github.actor, which does not reliably represent the PR author forpull_request_targetevents. As a result, Dependabot PRs were no longer excluded.Fix
pull_request.user.loginThis restores the intended auto-approve and auto-merge behavior for dependency updates.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.