From fb90721a94d0e7556d167909c504be09f6e08ec5 Mon Sep 17 00:00:00 2001 From: Jason <11360596+jpenilla@users.noreply.github.com> Date: Mon, 9 Jan 2023 14:43:54 -0700 Subject: [PATCH] [ci skip] Automatically close PRs from master branches on opening (#8779) --- .github/workflows/close_invalid_prs.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/close_invalid_prs.yml diff --git a/.github/workflows/close_invalid_prs.yml b/.github/workflows/close_invalid_prs.yml new file mode 100644 index 0000000000..34c2688d7e --- /dev/null +++ b/.github/workflows/close_invalid_prs.yml @@ -0,0 +1,14 @@ +name: Close invalid PRs + +on: + pull_request_target: + types: [ opened ] + +jobs: + run: + if: ${{ github.repository != github.event.pull_request.head.repo.full_name && github.head_ref == 'master' }} + runs-on: ubuntu-latest + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: "Please do not open pull requests from the `master` branch, create a new branch instead."