Skip to content

Commit f51d05d

Browse files
authored
chore: update project config (#63)
1 parent efeb42e commit f51d05d

File tree

2 files changed

+8
-50
lines changed

2 files changed

+8
-50
lines changed

.github/workflows/automerge.yml

+4-46
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,8 @@
1-
# Automatically merge pull requests opened by web3-bot, as soon as (and only if) all tests pass.
2-
# This reduces the friction associated with updating with our workflows.
3-
4-
on: [ pull_request ]
51
name: Automerge
2+
on: [ pull_request ]
63

74
jobs:
8-
automerge-check:
9-
if: github.event.pull_request.user.login == 'web3-bot'
10-
runs-on: ubuntu-latest
11-
outputs:
12-
status: ${{ steps.should-automerge.outputs.status }}
13-
steps:
14-
- uses: actions/checkout@v2
15-
with:
16-
fetch-depth: 0
17-
- name: Check if we should automerge
18-
id: should-automerge
19-
run: |
20-
for commit in $(git rev-list --first-parent origin/${{ github.event.pull_request.base.ref }}..${{ github.event.pull_request.head.sha }}); do
21-
committer=$(git show --format=$'%ce' -s $commit)
22-
echo "Committer: $committer"
23-
if [[ "$committer" != "[email protected]" ]]; then
24-
echo "Commit $commit wasn't committed by web3-bot, but by $committer."
25-
echo "::set-output name=status::false"
26-
exit
27-
fi
28-
done
29-
echo "::set-output name=status::true"
305
automerge:
31-
needs: automerge-check
32-
runs-on: ubuntu-latest
33-
# The check for the user is redundant here, as this job depends on the automerge-check job,
34-
# but it prevents this job from spinning up, just to be skipped shortly after.
35-
if: github.event.pull_request.user.login == 'web3-bot' && needs.automerge-check.outputs.status == 'true'
36-
steps:
37-
- name: Wait on tests
38-
uses: lewagon/wait-on-check-action@bafe56a6863672c681c3cf671f5e10b20abf2eaa # v0.2
39-
with:
40-
ref: ${{ github.event.pull_request.head.sha }}
41-
repo-token: ${{ secrets.GITHUB_TOKEN }}
42-
wait-interval: 10
43-
running-workflow-name: 'automerge' # the name of this job
44-
- name: Merge PR
45-
uses: pascalgn/automerge-action@741c311a47881be9625932b0a0de1b0937aab1ae # v0.13.1
46-
env:
47-
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
48-
MERGE_LABELS: ""
49-
MERGE_METHOD: "squash"
50-
MERGE_DELETE_BRANCH: true
6+
uses: protocol/.github/.github/workflows/automerge.yml@master
7+
with:
8+
job: 'automerge'

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,10 @@
138138
"p-retry": "^5.1.0",
139139
"uint8arrays": "^3.0.0"
140140
},
141-
"peerDependencies": {
142-
"aegir": "^37.0.4"
143-
},
144141
"devDependencies": {
145-
"aegir": "^37.0.4"
142+
"aegir": "^37.0.6"
143+
},
144+
"peerDependencies": {
145+
"aegir": "^37.0.6"
146146
}
147147
}

0 commit comments

Comments
 (0)