Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/prevent-pr-onto-main-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Prevent PRs made to main branch except from develop branch
on:
pull_request_target:
types:
- opened
- reopened
- synchronize
jobs:
check-branches:
runs-on: ubuntu-latest
steps:
- name: Check branches
run: |
if [ ${{ github.head_ref }} != "develop" ] && [ ${{ github.base_ref }} == "main" ]; then
echo "Merge requests to main branch are only allowed from develop branch. Please rebase your commits to the develop branch and submit a new pull request"
exit 1
fi
Loading