From 5c596f142ce8ea01c59e5d68b85103fecfc343d7 Mon Sep 17 00:00:00 2001 From: Percy Ma Date: Sat, 11 Feb 2023 23:56:02 +0800 Subject: [PATCH] ci: make sure new PRs are sent to dev (#7342) --- .github/workflows/target-branch.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/target-branch.yml diff --git a/.github/workflows/target-branch.yml b/.github/workflows/target-branch.yml new file mode 100644 index 000000000..e644c8305 --- /dev/null +++ b/.github/workflows/target-branch.yml @@ -0,0 +1,20 @@ +name: Make sure new PRs are sent to dev + +on: + pull_request_target: + types: [opened, edited] + +jobs: + check-branch: + runs-on: ubuntu-latest + steps: + - uses: Vankka/pr-target-branch-action@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + target: master + exclude: dev + change-to: dev + comment: | + Your PR was set to target `master`, PRs should be target `dev` + The base branch of this PR has been automatically changed to `dev`, please check that there are no merge conflicts