Skip to content

Commit 1d39288

Browse files
committed
Automerge Dependency Updates
Our tests are super good, there isn't any reason to manually review things that pass tests. The only risk is supply chain attacks and those are best circumvented be waiting a while between merging and releasing.
1 parent f68a3dc commit 1d39288

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

.github/workflows/auto-merge.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Dependabot auto-merge
2+
on: pull_request_target
3+
permissions:
4+
pull-requests: write
5+
contents: write
6+
jobs:
7+
dependabot:
8+
runs-on: ubuntu-latest
9+
if: ${{ github.actor == 'dependabot[bot]' }}
10+
steps:
11+
- name: Enable auto-merge for Dependabot PRs
12+
uses: peter-evans/enable-pull-request-automerge@v1
13+
with:
14+
pull-request-number: ${{github.event.pull_request.number}}
15+
token: ${{ secrets.GITHUB_TOKEN }}
16+
merge-method: merge
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Update Transitive Dependencies
2+
3+
on:
4+
schedule:
5+
- cron: '15 11 * * 0' # weekly, on Sunday morning (UTC)
6+
workflow_dispatch:
7+
8+
jobs:
9+
update:
10+
name: Tests
11+
runs-on: macos-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-node@v2
16+
with:
17+
node-version: 14
18+
- name: remove and re-create lock file
19+
run: |
20+
rm package-lock.json
21+
npm install
22+
- name: Create Pull Request
23+
id: cpr
24+
uses: peter-evans/create-pull-request@v3
25+
with:
26+
token: ${{ secrets.GITHUB_TOKEN }}
27+
commit-message: Update Transitive Dependencies
28+
title: Update Transitive Dependencies
29+
body: |
30+
- Dependency updates
31+
32+
Auto-generated by [create-pull-request][1]
33+
34+
[1]: https://github.com/peter-evans/create-pull-request
35+
branch: auto-update-dependencies
36+
labels: dependencies
37+
- name: Enable Pull Request Automerge
38+
if: steps.cpr.outputs.pull-request-operation == 'created'
39+
uses: peter-evans/enable-pull-request-automerge@v1
40+
with:
41+
token: ${{ secrets.GITHUB_TOKEN }}
42+
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
43+
merge-method: merge

0 commit comments

Comments
 (0)