From 66b22f2e24bf9c7ce48b8c6540763af471caa0c2 Mon Sep 17 00:00:00 2001 From: "joseph@dxw.com" Date: Wed, 25 Sep 2024 11:50:35 +0100 Subject: [PATCH] Remove automatic rebase workflow This workflow often throws errors and blocks PRs from being merged. It is mostly unnecessary since dependency PRs rebase themselves. --- .github/workflows/automatic-rebase.yml | 79 -------------------------- 1 file changed, 79 deletions(-) delete mode 100644 .github/workflows/automatic-rebase.yml diff --git a/.github/workflows/automatic-rebase.yml b/.github/workflows/automatic-rebase.yml deleted file mode 100644 index dbe3cb1d..00000000 --- a/.github/workflows/automatic-rebase.yml +++ /dev/null @@ -1,79 +0,0 @@ -on: - issue_comment: - types: - - created - pull_request_target: - types: - - auto_merge_enabled - -env: - AUTO_REBASE_PERSONAL_ACCESS_TOKEN: - ${{ secrets.AUTO_REBASE_PERSONAL_ACCESS_TOKEN }} - -jobs: - check-token: - if: | - ( - github.event.issue.pull_request && - contains(github.event.comment.body, '/rebase') - ) || - github.event_name == 'pull_request_target' - - runs-on: ubuntu-latest - - steps: - - if: "! env.AUTO_REBASE_PERSONAL_ACCESS_TOKEN" - name: Prompt to add a token - uses: peter-evans/create-or-update-comment@v1 - with: - issue-number: ${{ github.event.issue.number || github.event.number }} - body: | - To automatically rebase, you need to add a [personal access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) with the name `AUTO_REBASE_PERSONAL_ACCESS_TOKEN` to the [secrets section of this repo](https://github.com/${{ github.event.repository.full_name }}/settings/secrets/actions). - - Once this is done, you can try the `/rebase` command again. - - - if: github.event.comment - name: React to the triggering comment - uses: peter-evans/create-or-update-comment@v1 - with: - comment-id: ${{ github.event.comment.id }} - reactions: - ${{ env.AUTO_REBASE_PERSONAL_ACCESS_TOKEN && '+1' || '-1' }} - - - if: "! env.AUTO_REBASE_PERSONAL_ACCESS_TOKEN" - name: Return a failing state if we have no token - run: exit 1 - - rebase: - needs: check-token - name: Rebase - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - token: ${{ env.AUTO_REBASE_PERSONAL_ACCESS_TOKEN }} - fetch-depth: 0 - - - name: Rebase on top of the default branch - uses: cirrus-actions/rebase@1.8 - env: - GITHUB_TOKEN: ${{ env.AUTO_REBASE_PERSONAL_ACCESS_TOKEN }} - - - if: failure() - name: Notify of the failure - uses: peter-evans/create-or-update-comment@v1 - with: - issue-number: ${{ github.event.issue.number || github.event.number }} - body: | - Automatic rebasing for this issue has failed :disappointed: - - You'll have to rebase this one manually, I'm afraid. - - - if: success() && github.event.comment - name: React to the triggering comment - uses: peter-evans/create-or-update-comment@v1 - with: - comment-id: ${{ github.event.comment.id }} - reactions: hooray