From 4c3826baf3e8a79c19a72915f46ff7fab7a56339 Mon Sep 17 00:00:00 2001 From: FAIZ NADEEM <90679833+Faiz-Nadeem@users.noreply.github.com> Date: Tue, 27 Aug 2024 15:37:56 +0500 Subject: [PATCH] warns_merge_master.yml --- .github/workflows/warns_merge_master.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/warns_merge_master.yml b/.github/workflows/warns_merge_master.yml index ae2aab6ba..bfe68a041 100644 --- a/.github/workflows/warns_merge_master.yml +++ b/.github/workflows/warns_merge_master.yml @@ -1,19 +1,20 @@ -name: Pull requests can't target master branch -"on": + +name: Warn Against Merging to Master + +on: pull_request: - types: - - opened - - synchronize - - reopened branches: - master jobs: - check: + prevent-master-merge: runs-on: ubuntu-latest + steps: - - name: Warning marge into master - run: | - echo -e "::warning::This pull request directly merge into \"master\" branch, normally development happens on \"dev\" branch." - exit 1 + - name: Check Pull Request Target + run: | + echo "Warning: You are trying to merge into the master branch." + exit 1 + +