diff --git a/README.md b/README.md index fa494bf..d6bd4ce 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,12 @@ on: jobs: rebase: name: Rebase - if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') - runs-on: ubuntu-latest + if: >- + github.event.issue.pull_request != '' && + ( + contains(github.event.comment.body, '/rebase') || + contains(github.event.comment.body, '/autosquash') + ) runs-on: ubuntu-latest steps: - name: Checkout the latest code uses: actions/checkout@v2 @@ -28,6 +32,8 @@ jobs: fetch-depth: 0 # otherwise, you will fail to push refs to dest repo - name: Automatic Rebase uses: cirrus-actions/rebase@1.5 + with: + autosquash: ${{ contains(github.event.comment.body, '/autosquash') || contains(github.event.comment.body, '/rebase-autosquash') }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ```