Skip to content

Commit fd7347d

Browse files
committed
Updating interval to monthly. Separating general PR logic from Dependabot logic and applying rules in settings.
1 parent 6a43ff2 commit fd7347d

File tree

3 files changed

+23
-27
lines changed

3 files changed

+23
-27
lines changed

.github/dependabot.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ version: 2
33
multi-ecosystem-groups:
44
maintenance:
55
schedule:
6-
interval: "cron"
7-
cronjob: "0 6 1-7 * 1" # Every first Monday of the month at 6:00am
6+
interval: "monthly"
7+
time: "06:00"
8+
day: "monday"
89
timezone: "America/Detroit"
910
commit-message:
1011
prefix: "Monthly dependency updates: "

.github/workflows/dependabot.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Dependabot pull requests
2+
3+
on: pull_request
4+
5+
jobs:
6+
dependabot:
7+
name: Auto-merge Dependabot PRs
8+
runs-on: ubuntu-latest
9+
if: ${{github.event.pull_request.user.login == 'dependabot[bot]'}}
10+
permissions:
11+
pull-requests: write
12+
contents: write
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
PR_URL: ${{ github.event.pull_request.html_url }}
16+
steps:
17+
- name: Approve the PR
18+
run: gh pr review --approve "$PR_URL"
19+
- name: Merge the PR
20+
run: gh pr merge --squash --auto "$PR_URL"

.github/workflows/pull-request.yml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ on:
44
push:
55
pull_request:
66

7-
permissions:
8-
contents: read
9-
107
jobs:
118
build-and-test:
129
name: Build and test
@@ -27,25 +24,3 @@ jobs:
2724
run: npm run build
2825
- name: Run tests
2926
run: npm run test
30-
31-
dependabot:
32-
name: Dependabot pull requests
33-
needs: build-and-test
34-
runs-on: ubuntu-latest
35-
# Only continue if a pull request was created by dependabot
36-
if: ${{github.event.pull_request.user.login == 'dependabot[bot]' && github.event_name == 'pull_request'}}
37-
permissions:
38-
pull-requests: write
39-
contents: write
40-
env:
41-
PR_URL: ${{github.event.pull_request.html_url}}
42-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
43-
steps:
44-
- name: Fetch Dependabot Metadata
45-
uses: dependabot/fetch-metadata@v2
46-
with:
47-
github-token: "${{ secrets.GITHUB_TOKEN }}"
48-
- name: Approve the PR
49-
run: gh pr review --approve "$PR_URL"
50-
- name: Merge the PR
51-
run: gh pr merge --squash --auto "$PR_URL"

0 commit comments

Comments
 (0)