Skip to content

Commit 2bf4724

Browse files
authored
Merge pull request #9 from Goddhi/dependabot-implementation
FIX:implemented depenabot
2 parents b0811f0 + 0050776 commit 2bf4724

File tree

3 files changed

+77
-0
lines changed

3 files changed

+77
-0
lines changed

.github/dependabot.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directories:
5+
- "/"
6+
schedule:
7+
interval: "daily"
8+
time: "09:00"
9+
timezone: "Europe/Berlin"
10+
versioning-strategy: increase
11+
commit-message:
12+
prefix: "deps"
13+
prefix-development: "deps(dev)"
14+
reviewers:
15+
- "bajtos"
16+
- "juliangruber"
17+
- "pyropy"
18+
- "NikolasHaimerl"
19+
- package-ecosystem: "github-actions"
20+
directory: "/"
21+
schedule:
22+
interval: "daily"
23+
time: "09:00"
24+
timezone: "Europe/Berlin"
25+
commit-message:
26+
prefix: "ci"
27+
reviewers:
28+
- "bajtos"
29+
- "juliangruber"
30+
- "pyropy"
31+
- "NikolasHaimerl"
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Dependabot auto-approve minor updates
2+
on: pull_request
3+
4+
permissions:
5+
pull-requests: write
6+
7+
jobs:
8+
dependabot:
9+
runs-on: ubuntu-latest
10+
if: ${{ github.actor == 'dependabot[bot]' }}
11+
strategy:
12+
matrix:
13+
dependencyStartsWith:
14+
- '@cloudflare/'
15+
- 'wrangler'
16+
- 'vitest'
17+
steps:
18+
- name: Dependabot metadata
19+
id: metadata
20+
uses: dependabot/fetch-metadata@v2
21+
with:
22+
github-token: "${{ secrets.GITHUB_TOKEN }}"
23+
- name: Approve a PR
24+
if: ${{startsWith(steps.metadata.outputs.dependency-names, matrix.dependencyStartsWith) && (steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor')}}
25+
run: gh pr review --approve "$PR_URL"
26+
env:
27+
PR_URL: ${{github.event.pull_request.html_url}}
28+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Dependabot auto-merge
2+
on: pull_request
3+
4+
permissions:
5+
contents: write
6+
pull-requests: write
7+
8+
jobs:
9+
dependabot:
10+
runs-on: ubuntu-latest
11+
if: ${{ github.actor == 'dependabot[bot]' }}
12+
steps:
13+
- name: Authenticate cli with a PAT
14+
run: echo "${{ secrets.DEPENDABOT_TOKEN }}" | gh auth login --with-token
15+
- name: Enable auto-merge for Dependabot PRs
16+
run: gh pr merge --auto --squash "$PR_URL"
17+
env:
18+
PR_URL: ${{github.event.pull_request.html_url}}

0 commit comments

Comments
 (0)