Enable Automatic Rebase: Fix #8927 (#9018)

* Enable Automatic Rebase: Fix #8927

* Update rebase.yml to use startsWith

Use startsWith() instead of contains() in Github Action so as to prevent accidental Rebase of PRs.
This commit is contained in:
Awasum Yannick 2020-07-02 11:42:21 +01:00 committed by GitHub
parent 1662473174
commit f298f8c41f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

18
.github/workflows/rebase.yml vendored Normal file
View file

@ -0,0 +1,18 @@
# https://github.com/marketplace/actions/automatic-rebase (https://github.com/cirrus-actions/rebase)
on:
issue_comment:
types: [created]
name: Automatic Rebase
jobs:
rebase:
name: Rebase
if: github.event.issue.pull_request != '' && startsWith(github.event.comment.body, '/rebase') && github.event.comment.author_association == 'MEMBER'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0
- name: Automatic Rebase
uses: cirrus-actions/rebase@1.3.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}