Skip to content

Commit

Permalink
warns_merge_master.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Faiz-Nadeem authored Aug 27, 2024
1 parent 82a973c commit 4c3826b
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/warns_merge_master.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4c3826b

Please sign in to comment.