Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Dependabot Auto Merge
on:
pull_request:
types:
- opened
- synchronize
- reopened

permissions:
pull-requests: write # needed to update/merge PRs
contents: write # needed to push merge commits to the repo

jobs:
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 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

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.
14 changes: 14 additions & 0 deletions .github/workflows/dependabot-force-rebase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Dependabot Force Rebase
on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
rebase:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
permissions:
contents: write # 👈 allows pushing commits to branches
pull-requests: write # 👈 allows updating PR metadata
steps:
- uses: peter-evans/rebase@v2