Skip to content

Commit 1c9a5a1

Browse files
committed
no more merging to main
must be from develop or tests will fail, failing tests will not allow merge
1 parent ec00fa8 commit 1c9a5a1

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/require-develop.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Check pull request source branch
2+
on:
3+
pull_request_target:
4+
types:
5+
- opened
6+
- reopened
7+
- synchronize
8+
- edited
9+
jobs:
10+
check-branches:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check branches
14+
run: |
15+
if [ ${{ github.head_ref }} != "develop" ] && [ ${{ github.base_ref }} == "main" ]; then
16+
echo "Merge requests to main branch are only allowed from dev branch."
17+
exit 1
18+
fi

0 commit comments

Comments
 (0)