fix(ci): restrict merge pipeline to default/protected branches#90
fix(ci): restrict merge pipeline to default/protected branches#90Teebor-Choka merged 1 commit intomainfrom
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 58 minutes and 41 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 (1)
📝 WalkthroughWalkthroughA GitHub Actions workflow trigger filter has been added to the merge workflow. The Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
5115786 to
34747f2
Compare
There was a problem hiding this comment.
Pull request overview
Restricts the “Merge” GitHub Actions workflow so it only triggers for PRs closed against the main branch, reducing CI usage for non-default-branch merges.
Changes:
- Added a
pull_request.branches: [main]filter to the merge workflow trigger. - Keeps existing job-level
merged == truegating, but reduces unnecessary workflow triggers on non-mainbase branches.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| branches: | ||
| - main |
There was a problem hiding this comment.
The PR description says a base.ref check was added to all job conditions, but this change only adds an on.pull_request.branches: [main] filter; the job if: clauses are unchanged. Either update the description to match the implementation, or add github.event.pull_request.base.ref checks to the jobs (e.g., comparing against github.event.repository.default_branch if the intent is truly “default branch”).
| branches: | ||
| - main |
There was a problem hiding this comment.
Hard-coding main here means the workflow will stop running if the repository’s default branch is renamed, and it doesn’t match the title’s “default/protected branches” wording. If you need this to follow the repo default branch, consider moving the branch restriction into job-level if: using github.event.repository.default_branch (or explicitly list all allowed base branches here if that’s the intent).
Add branches filter to the pull_request trigger so the merge workflow only fires for PRs targeting the default branch. Previously it triggered for all merged PRs, including PR-to-PR merges. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
34747f2 to
c79ed69
Compare
Summary
branchesfilter to the merge workflowpull_requesttrigger to prevent it from running on PR-to-PR merges