Skip to content

Add Dependabot auto-merge workflow - #175

Merged
nev21 merged 2 commits into
mainfrom
nev21/dependabot
Dec 1, 2025
Merged

nev21 merged 2 commits into
mainfrom
nev21/dependabot

Conversation

@nev21

@nev21 nev21 commented Dec 1, 2025

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings December 1, 2025 07:40
Adds a GitHub Actions workflow to force rebase Dependabot PRs.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a GitHub Actions workflow to automatically merge Dependabot pull requests. The workflow is configured to auto-merge minor dependency updates using squash merge.

Key Changes

  • New workflow file that triggers on Dependabot PRs (opened, synchronized, reopened)
  • Uses the fastify/github-action-merge-dependabot@v3 action to handle automatic merging
  • Configured to squash merge PRs for minor version updates

with:
github-token: ${{ secrets.GITHUB_TOKEN }}
merge-method: squash
target: minor

Copilot AI Dec 1, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow will auto-merge Dependabot PRs without waiting for CI checks to pass. This is risky because it could merge broken code if tests fail. The workflow should include a check to ensure the CI workflow completes successfully before merging. Consider adding a dependency on the CI job status or using the action's approve-only option with GitHub's built-in auto-merge that waits for status checks.

Suggested change
target: minor
target: minor
approve-only: true

Copilot uses AI. Check for mistakes.
Comment on lines +14 to +23
auto-merge:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Auto merge Dependabot PRs
uses: fastify/github-action-merge-dependabot@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
merge-method: squash
target: minor

Copilot AI Dec 1, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The target: minor setting will only auto-merge minor and patch updates. Given that Dependabot is configured to update both npm packages and GitHub Actions (see .github/dependabot.yml), this configuration may not be appropriate for GitHub Actions updates which follow different versioning patterns (e.g., v3, v4). Consider whether all update types should be auto-merged or if GitHub Actions should be handled separately.

Suggested change
auto-merge:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Auto merge Dependabot PRs
uses: fastify/github-action-merge-dependabot@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
merge-method: squash
target: minor
auto-merge-npm:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]' && contains(github.event.pull_request.title, 'npm')
steps:
- name: Auto merge Dependabot npm PRs
uses: fastify/github-action-merge-dependabot@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
merge-method: squash
target: minor
auto-merge-actions:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]' && (contains(github.event.pull_request.title, 'github-actions') || contains(github.event.pull_request.title, 'actions/'))
steps:
- name: Auto merge Dependabot GitHub Actions PRs
uses: fastify/github-action-merge-dependabot@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
merge-method: squash
target: all

Copilot uses AI. Check for mistakes.
@nev21
nev21 merged commit 831bd98 into main Dec 1, 2025
8 checks passed
@nev21
nev21 deleted the nev21/dependabot branch December 1, 2025 07:57
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.

2 participants