Add action to warn against PR against master (should be develop)

This commit is contained in:
Nanne Baars 2021-09-29 18:12:22 +02:00
parent efca784acf
commit 49109154a8
No known key found for this signature in database
GPG Key ID: A6D6C06FE4EC14E7

18
.github/workflows/master_branch_pr.yml vendored Normal file
View File

@ -0,0 +1,18 @@
on:
pull_request:
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Post PR comment
if: failure()
uses: mshick/add-pr-comment@v1
with:
message: |
Hi @${{ github.event.pull_request.user.login }},
It looks like this pull request has been made against the ${{github.event.pull_request.head.repo.full_name}} `master` branch.
Since we use Git Flow all commits to master are through are from the develop branch.
You do not need to close this PR, you can change the target branch to `development` by clicking the _"Edit"_ button at the top of this page.