File tree 1 file changed +10
-6
lines changed
1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -4,24 +4,28 @@ on: pull_request
4
4
jobs :
5
5
dependabot :
6
6
runs-on : ubuntu-latest
7
- if : ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
7
+ if : startsWith( github.event.pull_request.user.login, 'dependabot')
8
8
env :
9
9
GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
10
10
steps :
11
- - uses : actions/checkout@v3
11
+ - uses : actions/checkout@v4
12
12
- name : checkout PR branch
13
13
# set upstream for other gh commands
14
14
run : gh pr checkout ${{github.event.pull_request.number}}
15
+ - name : Fetch PR metadata
16
+ id : metadata
17
+ uses : dependabot/fetch-metadata@v2
15
18
- name : Approve PR
16
19
run : |
17
20
if [ "$(gh pr status --json reviewDecision -q .currentBranch.reviewDecision)" != "APPROVED" ]; then
18
21
gh pr review --approve
19
22
else
20
23
echo "PR already approved"
21
24
fi
22
- - name : Fetch PR metadata
23
- id : metadata
24
- uses : dependabot/fetch-metadata@v1
25
25
- name : Enable auto-merge
26
- if : ${{ steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
26
+ if : steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch'
27
27
run : gh pr merge --auto --squash
28
+
29
+ permissions :
30
+ contents : write
31
+ pull-requests : write
You can’t perform that action at this time.
0 commit comments