Skip to content

Commit da0d212

Browse files
committed
Add Dependabot auto-approve workflow and update test dependencies
1 parent ad70e98 commit da0d212

3 files changed

Lines changed: 29 additions & 1 deletion

File tree

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ updates:
1616
tests:
1717
patterns:
1818
- "AutoFixture"
19-
- "FluentAssertions"
19+
- "AwesomeAssertions"
2020
- "xunit*"
2121
- "*Test*"
2222
- "coverlet*"
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Dependabot auto-approve and 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.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'marthijn/Sidio.Text.Base32' && contains(github.event.pull_request.title, 'tests group')
12+
steps:
13+
- name: Dependabot metadata
14+
id: metadata
15+
uses: dependabot/fetch-metadata@08eff52bf64351f401fb50d4972fa95b9f2c2d1b
16+
with:
17+
github-token: "${{ secrets.GITHUB_TOKEN }}"
18+
- name: Approve a PR
19+
run: gh pr review --approve "$PR_URL"
20+
env:
21+
PR_URL: ${{github.event.pull_request.html_url}}
22+
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
23+
- name: Enable auto-merge for Dependabot PRs
24+
run: gh pr merge --auto --merge "$PR_URL"
25+
env:
26+
PR_URL: ${{github.event.pull_request.html_url}}
27+
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

Sidio.Text.Base32.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Workflows", "Workflows", "{
2121
.github\dependabot.yml = .github\dependabot.yml
2222
.github\workflows\build.yml = .github\workflows\build.yml
2323
.github\workflows\release.yml = .github\workflows\release.yml
24+
.github\workflows\dependabot-autoapprove.yml = .github\workflows\dependabot-autoapprove.yml
2425
EndProjectSection
2526
EndProject
2627
Global

0 commit comments

Comments
 (0)