Skip to content

Commit 555eefb

Browse files
author
Roland Groza
committed
chore: add dependabot config and auto-merge workflow
1 parent 76e8dc7 commit 555eefb

2 files changed

Lines changed: 49 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: npm
5+
directory: /
6+
rebase-strategy: auto
7+
schedule:
8+
interval: "weekly"
9+
commit-message:
10+
prefix: "chore(deps):"
11+
versioning-strategy: increase
12+
# Patch bumps grouped into one PR (auto-merged on green CI); minor bumps
13+
# grouped into a separate PR for manual review; majors open individually.
14+
groups:
15+
patch:
16+
patterns:
17+
- "*"
18+
update-types:
19+
- patch
20+
minor:
21+
patterns:
22+
- "*"
23+
update-types:
24+
- minor
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Dependabot auto-merge
2+
on: pull_request
3+
4+
permissions:
5+
contents: write
6+
pull-requests: write
7+
8+
jobs:
9+
auto-merge:
10+
if: ${{ github.actor == 'dependabot[bot]' }}
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Fetch update metadata
15+
id: meta
16+
uses: dependabot/fetch-metadata@v2
17+
18+
# Auto-merge patch updates once the required checks pass. Minor and major
19+
# updates are left for manual review (the `if` below excludes them).
20+
- name: Enable auto-merge for patch
21+
if: ${{ steps.meta.outputs.update-type == 'version-update:semver-patch' }}
22+
run: gh pr merge --auto --squash "$PR_URL"
23+
env:
24+
PR_URL: ${{ github.event.pull_request.html_url }}
25+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)