Skip to content

Commit 10fdeb2

Browse files
authored
added gh workflow (#17)
* added gh workflow * added co-owner
1 parent 751c97e commit 10fdeb2

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@injas427
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Enforce Merge Source Branch
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main # Replace with your protected branch name
7+
8+
jobs:
9+
restrict-source-branch:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Check source branch
14+
run: |
15+
if [[ "${{ github.base_ref }}" != "main" || "${{ github.head_ref }}" != "develop" ]]; then
16+
echo "Pull requests to main must originate from develop."
17+
exit 1
18+
fi
19+
shell: bash

0 commit comments

Comments
 (0)