-
Notifications
You must be signed in to change notification settings - Fork 70
44 lines (44 loc) · 1.26 KB
/
auto_squash.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# auto merge any pr that
# 1. has ` [bot]` at the end of the pr title
# 2. has `automerge` and `automerge-squash` label
# note the first character in ` [bot]` is a thin space https://www.wikiwand.com/en/Thin_space
name: Auto Squash
on:
pull_request:
branches:
- mainnet
- sepolia
types:
- labeled
- synchronize
- opened
- edited
- ready_for_review
- reopened
- unlocked
pull_request_review:
types:
- submitted
status: {}
jobs:
# merge with WRITE_TOKEN so that subsequent actions can be triggered
# merge with squash
automerge-squash:
if: |
endsWith(github.event.pull_request.title, ' [bot]') &&
!(
github.head_ref == 'mainnet' &&
github.base_ref == 'sepolia'
)
runs-on: ubuntu-latest
steps:
- id: automerge-squash
name: automerge-squash
uses: pascalgn/automerge-action@22948e0bc22f0aa673800da838595a3e7347e584
continue-on-error: true
env:
GITHUB_TOKEN: "${{ secrets.WRITE_TOKEN }}"
MERGE_METHOD: "squash"
MERGE_LABELS: "automerge, automerge-squash"
MERGE_REMOVE_LABELS: "automerge, automerge-squash"
MERGE_COMMIT_MESSAGE: "Auto squash #{pullRequest.number} [bot]"