Skip to content

Require auto-merge and rebase for Dependabot (#49) #52

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

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

mattfsourcecode
Copy link
Owner

@mattfsourcecode mattfsourcecode commented Feb 6, 2025

This PR contributes to #49 by enforcing auto-merge as a required check for Dependabot PRs and ensuring that they are always rebased before merging.

Why This Change Is Needed

Previously, gh pr merge --auto --merge "$PR_URL" failed with:

GraphQL: Base branch was modified. Review and try the merge again. (mergePullRequest)
Error: Process completed with exit code 1.

https://github.com/mattfsourcecode/fastify-swc-typescript-server/actions/runs/13182494086/job/36796536875

This issue occurred when the base branch was modified by update-licenses after Dependabot created its PR, preventing automatic merging.

Key Changes:

  • Adds automatic rebase for Dependabot PRs to ensure they are always up to date before merging.
  • Makes auto-merge a required status check for Dependabot PRs.
  • Prevents auto-merge from affecting non-Dependabot PRs, ensuring normal PRs are not blocked.

@mattfsourcecode
Copy link
Owner Author

Additionally, auto-merge has been added as a required status check in the project rulesets. This merge will allow the auto-merge check to exit for non-Dependabot PRs.

@mattfsourcecode mattfsourcecode merged commit 07f3ffd into master Feb 6, 2025
4 checks passed
@mattfsourcecode mattfsourcecode deleted the require-auto-merge-rebase-for-dependabot branch February 6, 2025 18:02
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.

1 participant