Skip to content
This repository was archived by the owner on Oct 5, 2023. It is now read-only.

Commit b2bc622

Browse files
committed
update .github/workflows/automerge.yml
1 parent 797bcb3 commit b2bc622

File tree

1 file changed

+4
-46
lines changed

1 file changed

+4
-46
lines changed

.github/workflows/automerge.yml

Lines changed: 4 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,11 @@
11
# File managed by web3-bot. DO NOT EDIT.
22
# See https://github.com/protocol/.github/ for details.
33

4-
# Automatically merge pull requests opened by web3-bot, as soon as (and only if) all tests pass.
5-
# This reduces the friction associated with updating with our workflows.
6-
7-
on: [ pull_request ]
84
name: Automerge
5+
on: [ pull_request ]
96

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

0 commit comments

Comments
 (0)