Skip to content

Commit

Permalink
disallow pull request directly to master
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrolcl committed Mar 7, 2024
1 parent a8c84f9 commit 61e7b7e
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/check-branches.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Check pull request branch
on:
pull_request_target:
types:
- opened
- reopened
- synchronize
- edited

jobs:
check-branches:
runs-on: ubuntu-latest
steps:
- name: Check branches
run: |
if [ ${{ github.head_ref }} != "devel" ] && [ ${{ github.base_ref }} == "master" ]; then
echo "Merge requests to master branch are only allowed from devel branch."
exit 1
fi

0 comments on commit 61e7b7e

Please sign in to comment.