Skip to content

Commit 9968d36

Browse files
authored
FIX: updated script to auto-approve minor updates
1 parent 9e7cf15 commit 9968d36

File tree

2 files changed

+37
-21
lines changed

2 files changed

+37
-21
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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+
- '@sentry/'
15+
- mocha
16+
- pg
17+
- debug
18+
- ethers
19+
- typescript
20+
- postgrator
21+
- '@types/'
22+
- standard
23+
- cross-spawn
24+
- '@filecoin-station/spark-impact-evaluator'
25+
- '@fastify/'
26+
steps:
27+
- name: Dependabot metadata
28+
id: metadata
29+
uses: dependabot/fetch-metadata@v2
30+
with:
31+
github-token: "${{ secrets.GITHUB_TOKEN }}"
32+
- name: Approve a PR
33+
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')}}
34+
run: gh pr review --approve "$PR_URL"
35+
env:
36+
PR_URL: ${{github.event.pull_request.html_url}}
37+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/dependabot-auto-approve.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)