From 89ecc3ff68a6e86851bf96ba63aabf3d1cb6ed65 Mon Sep 17 00:00:00 2001 From: Andy Pan Date: Fri, 30 Jun 2023 21:17:48 +0800 Subject: [PATCH] chore: update the workflow of "Check pull request target" --- .github/workflows/pull-request.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index d5cf385..f9bf063 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -1,17 +1,19 @@ name: Check pull request target on: - pull_request_target: + pull_request: types: - opened - reopened - synchronize + branches: + - master jobs: check-branches: runs-on: ubuntu-latest steps: - name: Check target branch run: | - if [ ${{ github.base_ref }} == "master" ] && [ ${{ github.head_ref }} != "dev" ]; then + if [ ${{ github.head_ref }} != "dev" ]; then echo "Only pull requests from dev branch are only allowed to be merged into master branch." exit 1 - fi \ No newline at end of file + fi