Skip to content

ci: add branch policy workflow to enforce source branch rules - #52

Merged
patrickschaper merged 1 commit into
developmentfrom
feat/branch-policy-workflow
May 20, 2026
Merged

ci: add branch policy workflow to enforce source branch rules#52
patrickschaper merged 1 commit into
developmentfrom
feat/branch-policy-workflow

Conversation

@patrickschaper

Copy link
Copy Markdown
Owner

Summary

- requires PRs to main to come from development or release/v* branches

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@patrickschaper
patrickschaper merged commit 0b63c49 into development May 20, 2026
1 check passed
Comment on lines +10 to +27
name: Check source branch
runs-on: ubuntu-latest
steps:
- name: Require development or release branch
shell: bash
run: |
set -euo pipefail

source="${{ github.head_ref }}"
echo "Source branch: ${source}"

if [[ "${source}" == "development" || "${source}" == release/v* ]]; then
echo "Branch '${source}' is allowed to merge into main."
else
echo "Branch '${source}' is not allowed to merge into main." >&2
echo "Only 'development' and 'release/v*' branches may open PRs targeting main." >&2
exit 1
fi
@patrickschaper
patrickschaper deleted the feat/branch-policy-workflow branch May 20, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants