From 49109154a853952a476645814a1b23204a782874 Mon Sep 17 00:00:00 2001 From: Nanne Baars Date: Wed, 29 Sep 2021 18:12:22 +0200 Subject: [PATCH] Add action to warn against PR against master (should be develop) --- .github/workflows/master_branch_pr.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/master_branch_pr.yml diff --git a/.github/workflows/master_branch_pr.yml b/.github/workflows/master_branch_pr.yml new file mode 100644 index 000000000..5b6cc4e46 --- /dev/null +++ b/.github/workflows/master_branch_pr.yml @@ -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. \ No newline at end of file