From 8f9fa76555e115a58e07294398d76113a5bab39f Mon Sep 17 00:00:00 2001 From: Jake Herbst Date: Fri, 8 Oct 2021 09:12:47 -0400 Subject: [PATCH] Adding action check to inform committers if they are targeting the wrong branch - Fixes https://github.com/pi-hole/pi-hole/issues/3164 Signed-off-by: Jake Herbst --- .github/workflows/base-branch-check.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/base-branch-check.yml diff --git a/.github/workflows/base-branch-check.yml b/.github/workflows/base-branch-check.yml new file mode 100644 index 00000000..264377f2 --- /dev/null +++ b/.github/workflows/base-branch-check.yml @@ -0,0 +1,25 @@ +name: Base Branch Checker + +on: + pull_request: + branches-ignore: + - development + +jobs: + base_branch_check: + runs-on: ubuntu-latest + name: Base Branch Check + steps: + - name: Comment PR + uses: thollander/actions-comment-pull-request@v1 + + with: + message: 'Hello -- It appears you have opened this Pull Request to the wrong branch. + + ### Technical Requirements + + - Please submit Pull Requests to the **`development` branch only**. + + - Before Submitting your Pull Request, merge `development` with your new branch and fix any conflicts. + (Make sure you don''t break anything in `development`!)' + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}