Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [main]
branches: [main, development]
pull_request:
branches: [main]
branches: [main, development]

env:
CARGO_TERM_COLOR: always
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/enforce-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Enforce Branch Policy

on:
pull_request:
branches: [main]

jobs:
check-source-branch:
name: Verify PR Source
runs-on: ubuntu-latest
steps:
- name: Check if PR is from development
if: github.head_ref != 'development'
run: |
echo "❌ PRs to main must come from the development branch."
echo " Source branch: ${{ github.head_ref }}"
echo " Expected: development"
exit 1
- name: PR source is valid
if: github.head_ref == 'development'
run: echo "✅ PR is from development branch"