From bc1b31f47f121b35b54adf5d71619014e00fa8e9 Mon Sep 17 00:00:00 2001 From: Ben Thomson Date: Wed, 22 Jan 2020 10:52:32 +0800 Subject: [PATCH] Remove wrong branch action --- .../workflows/wrong-branch-notification.yaml | 21 ------------------- 1 file changed, 21 deletions(-) delete mode 100644 .github/workflows/wrong-branch-notification.yaml diff --git a/.github/workflows/wrong-branch-notification.yaml b/.github/workflows/wrong-branch-notification.yaml deleted file mode 100644 index aaa431602..000000000 --- a/.github/workflows/wrong-branch-notification.yaml +++ /dev/null @@ -1,21 +0,0 @@ -name: Wrong Branch - -on: - pull_request: - types: [opened] - branches: - - master - -jobs: - wrongBranch: - runs-on: ubuntu-latest - name: Fix Wrong Branch - steps: - - name: Alert submitter - run: | - export ISSUE_NUMBER=$(echo '${{ github.ref }}' | cut -d'/' -f3) - curl -s --request POST --url https://api.github.com/repos/${{ github.repository }}/issues/${ISSUE_NUMBER}/comments --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' --header 'content-type: application/json' --data '{"body": "This pull request has been made to the wrong branch. Please review [the contributing guidelines](https://github.com/octobercms/october/blob/master/.github/CONTRIBUTING.md#making-a-pull-request) as all PRs need to be made to the `develop` branch.\n\nWe'\''ll fix it for you this time, but please ensure you make any future PRs to the `develop` branch, not the `master` branch."}' > /dev/null - - name: Change base branch - run: | - export ISSUE_NUMBER=$(echo '${{ github.ref }}' | cut -d'/' -f3) - curl -s --request PATCH --url https://api.github.com/repos/${{ github.repository }}/pulls/${ISSUE_NUMBER} --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' --header 'content-type: application/json' --data '{"base": "develop"}' > /dev/null