Commit 12daca6674

12daca6674cb5254edc27d62dc160586fda4b20a

parent: 03ad835a79

Unregistered key

Alicia Sykes <alicia@omg.lol> · 2022-07-24 12:32 UTC
committer: <noreply@github.com>

Adds action for easier rebasing of PRs

Layout: unified · split

.github/workflows/rebase-pr.yml added +28
@@ -0,0 +1,28 @@
1# Rebase a pull request, triggered by comment containing `/rebase`
2name: ⏩ Rebase PR
3on:
4 issue_comment:
5 types: [created]
6jobs:
7 rebase:
8 name: Rebase
9 if: >-
10 github.event.issue.pull_request != '' &&
11 (
12 contains(github.event.comment.body, '/rebase') ||
13 contains(github.event.comment.body, '/autosquash')
14 )
15 runs-on: ubuntu-latest
16 steps:
17 - name: Checkout the latest code
18 uses: actions/checkout@v2
19 with:
20 token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
21 fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
22 - name: Automatic Rebase
23 uses: cirrus-actions/rebase@1.7
24 with:
25 autosquash: ${{ contains(github.event.comment.body, '/autosquash') || contains(github.event.comment.body, '/rebase-autosquash') }}
26 env:
27 GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
28