chore: update auto-merge workflows to include major version bumps#72
Conversation
|
Warning Review limit reached
More reviews will be available in 52 minutes and 17 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe ChangesWorkflow Auto-merge Update
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
There was a problem hiding this comment.
Pull request overview
This PR updates the bot auto-merge GitHub Actions workflow to allow Dependabot PRs with major version bumps to be auto-merged (subject to the repository’s existing merge requirements), by removing the previous semver-major exclusion.
Changes:
- Removes the conditional that prevented auto-merging
version-update:semver-majorDependabot PRs. - Renames the step to reflect broader “dependency updates” auto-merge behavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
🧹 Nitpick comments (2)
.github/workflows/auto-merge-bots.yml (2)
15-18: ⚡ Quick winRemove unused metadata fetch step.
Line 15-18 (
dependabot/fetch-metadata@v3) is now dead code becauseid: metaoutputs are no longer referenced after removing the semver filter. Keeping it adds unnecessary external action execution and token exposure surface.Proposed diff
- - uses: dependabot/fetch-metadata@v3 - id: meta - with: - github-token: "${{ secrets.GITHUB_TOKEN }}" - - name: Auto-merge dependency updates run: gh pr merge --auto --squash --delete-branch "$PR_URL"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/auto-merge-bots.yml around lines 15 - 18, Remove the unused dependabot/fetch-metadata@v3 step (lines 15-18) from the workflow file. Since the outputs from the meta step are no longer referenced anywhere in the workflow after the semver filter was removed, this entire step is dead code and should be deleted to reduce unnecessary external action execution and token exposure.
20-24: Add conditions to check update severity before auto-merging Dependabot PRs.The auto-merge workflow (lines 20-24) currently auto-merges all Dependabot updates without checking update type or severity. While Dependabot is currently configured only for
github-actionsecosystem updates, the workflow should conditionally block semver-major version bumps to avoid unexpected breaking changes. Consider using the metadata fromdependabot/fetch-metadatastep to conditionally merge only minor and patch updates:Example approach
- name: Auto-merge dependency updates if: steps.meta.outputs.update-type != 'version-update:semver-major' run: gh pr merge --auto --squash --delete-branch "$PR_URL" env: PR_URL: ${{ github.event.pull_request.html_url }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}Additionally, verify that branch protection rules on the default branch (e.g., required status checks, required reviews) are configured as a defense-in-depth measure.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/auto-merge-bots.yml around lines 20 - 24, The auto-merge workflow step "Auto-merge dependency updates" currently merges all Dependabot PRs without filtering by update severity. Add a conditional check using the dependabot/fetch-metadata step output to prevent auto-merging of semver-major version bumps, which may contain breaking changes. Add an if condition to the auto-merge step that evaluates the update-type from the metadata step, allowing only non-major version updates to be auto-merged. Additionally, verify that the repository has configured appropriate branch protection rules such as required status checks and code reviews as an additional safety measure.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/workflows/auto-merge-bots.yml:
- Around line 15-18: Remove the unused dependabot/fetch-metadata@v3 step (lines
15-18) from the workflow file. Since the outputs from the meta step are no
longer referenced anywhere in the workflow after the semver filter was removed,
this entire step is dead code and should be deleted to reduce unnecessary
external action execution and token exposure.
- Around line 20-24: The auto-merge workflow step "Auto-merge dependency
updates" currently merges all Dependabot PRs without filtering by update
severity. Add a conditional check using the dependabot/fetch-metadata step
output to prevent auto-merging of semver-major version bumps, which may contain
breaking changes. Add an if condition to the auto-merge step that evaluates the
update-type from the metadata step, allowing only non-major version updates to
be auto-merged. Additionally, verify that the repository has configured
appropriate branch protection rules such as required status checks and code
reviews as an additional safety measure.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 0d52c73f-237c-4252-bc2f-525d4b09ce83
📒 Files selected for processing (1)
.github/workflows/auto-merge-bots.yml
This PR updates the auto-merge workflow to allow major version bumps for bot updates.
Summary by CodeRabbit