Skip to content

Commit 399c2a2

Browse files
authored
Add rebase action (WalletConnect#78)
1 parent 4b038f0 commit 399c2a2

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/rebase.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Automatic Rebase
2+
on:
3+
issue_comment:
4+
types: [created]
5+
jobs:
6+
rebase:
7+
name: Rebase
8+
if: >-
9+
github.event.issue.pull_request != '' &&
10+
(
11+
contains(github.event.comment.body, '/rebase') ||
12+
contains(github.event.comment.body, '/autosquash')
13+
)
14+
steps:
15+
- name: Checkout the latest code
16+
uses: actions/checkout@v2
17+
with:
18+
token: ${{ secrets.GITHUB_TOKEN }}
19+
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
20+
- name: Automatic Rebase
21+
uses: cirrus-actions/rebase@1.7
22+
with:
23+
autosquash: ${{ contains(github.event.comment.body, '/autosquash') || contains(github.event.comment.body, '/rebase-autosquash') }}
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)