Skip to content

Commit

Permalink
no more merging to main
Browse files Browse the repository at this point in the history
must be from develop or tests will fail, failing tests will not allow
merge
  • Loading branch information
twilwa committed Dec 12, 2024
1 parent ec00fa8 commit 1c9a5a1
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/require-develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Check pull request source 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 }} != "develop" ] && [ ${{ github.base_ref }} == "main" ]; then
echo "Merge requests to main branch are only allowed from dev branch."
exit 1
fi

0 comments on commit 1c9a5a1

Please sign in to comment.