Skip to content

Commit eb3d235

Browse files
authored
Merge pull request #294 from tedwaine/develop
Add PR branch check workflow.
2 parents 0cfd8ee + 9e358a5 commit eb3d235

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Prevent PRs made to main branch except from develop branch
2+
on:
3+
pull_request_target:
4+
types:
5+
- opened
6+
- reopened
7+
- synchronize
8+
jobs:
9+
check-branches:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check branches
13+
run: |
14+
if [ ${{ github.head_ref }} != "develop" ] && [ ${{ github.base_ref }} == "main" ]; then
15+
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"
16+
exit 1
17+
fi

0 commit comments

Comments
 (0)