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 <jmherbst@gmail.com>
This commit is contained in:
Jake Herbst 2021-10-08 09:12:47 -04:00
parent ab27a3bd45
commit 8f9fa76555

25
.github/workflows/base-branch-check.yml vendored Normal file
View file

@ -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 }}