From 6c421e0b0754c57375d74feb1d6893d6fd55d088 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Fri, 1 Oct 2021 21:00:56 +0100 Subject: [PATCH] :building_construction: Adds action for easy PR rebasing --- .github/workflows/auto-rebase-pr.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/auto-rebase-pr.yml diff --git a/.github/workflows/auto-rebase-pr.yml b/.github/workflows/auto-rebase-pr.yml new file mode 100644 index 00000000..1ea7aa2b --- /dev/null +++ b/.github/workflows/auto-rebase-pr.yml @@ -0,0 +1,23 @@ +# When a '/rebase' comment is added to a PR, it will be rebased from the main branch +name: 🏗️ Automatic PR Rebase +on: + issue_comment: + types: [created] +jobs: + rebase: + name: Rebase + if: > + github.event.issue.pull_request != '' + && contains(github.event.comment.body, '/rebase') + && github.event.comment.author_association == 'MEMBER' + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + token: ${{ secrets.BOT_GITHUB_TOKEN }} + fetch-depth: 0 + - name: Rebase + uses: cirrus-actions/rebase@1.4 + env: + GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} \ No newline at end of file