forked from dotnet/maui
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (33 loc) · 951 Bytes
/
rebase.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
name: Automatic Rebase
on:
issue_comment:
types: [created]
permissions:
pull-requests: write
contents: write
jobs:
rebase:
name: Rebase
runs-on: ubuntu-latest
if: >-
github.event.issue.pull_request != '' &&
(
startsWith(github.event.comment.body, '/rebase') ||
startsWith(github.event.comment.body, '/autosquash')
)
steps:
- name: Checkout the latest code
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
- name: Automatic Rebase
uses: cirrus-actions/[email protected]
with:
autosquash: >-
${{
startsWith(github.event.comment.body, '/autosquash') ||
startsWith(github.event.comment.body, '/rebase-autosquash')
}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}