diff --git a/.github/workflows/pr-rebase.yml b/.github/workflows/pr-rebase.yml new file mode 100644 index 00000000..63ccb8cb --- /dev/null +++ b/.github/workflows/pr-rebase.yml @@ -0,0 +1,24 @@ +name: Automatic Rebase +on: + issue_comment: + types: [created] +permissions: + contents: read +jobs: + rebase: + name: Rebase + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + if: github.event.issue.pull_request != '' && (contains(github.event.comment.body, '/rebase') || contains(github.event.comment.body, '/autosquash')) && github.event.comment.author_association == 'MEMBER' + steps: + - name: Checkout the latest code + uses: actions/checkout@v4 + with: + token: ${{ secrets.BOT_PAT }} + fetch-depth: 0 + - name: Automatic Rebase + uses: cirrus-actions/rebase@1.8 + env: + GITHUB_TOKEN: ${{ secrets.BOT_PAT }} \ No newline at end of file