Skip to content

Commit b3217eb

Browse files
authored
docs(governance): enforce release-branch protected flow (#6)
1 parent 0f0f77a commit b3217eb

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: CI (Master Promotion)
2+
3+
on:
4+
pull_request_target:
5+
branches:
6+
- master
7+
types:
8+
- opened
9+
- reopened
10+
- synchronize
11+
- edited
12+
- ready_for_review
13+
14+
jobs:
15+
master-promotion:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Enforce master source branch
19+
env:
20+
HEAD_REF: ${{ github.event.pull_request.head.ref }}
21+
BASE_REF: ${{ github.event.pull_request.base.ref }}
22+
run: |
23+
set -euo pipefail
24+
[ "$BASE_REF" = "master" ] || exit 0
25+
if [[ ! "$HEAD_REF" =~ ^release/ ]]; then
26+
echo "::error::PRs targeting master must come from release/* branches. Found head branch: $HEAD_REF"
27+
exit 1
28+
fi
29+
echo "master promotion rule satisfied: $HEAD_REF -> $BASE_REF"

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ This repository follows Tinman Doctrine.
2424
- Prefer small, unambiguous issues; split broad tasks into manageable subtasks
2525
- Keep commits small and issue-scoped; default to one issue -> one small commit set
2626
- Exceptions are allowed for non-diff tasks, discovery-first work, or unavoidable architecture-level changes; document rationale in the issue or PR
27+
- Do not push directly to protected branches (`master`, `develop`); use PR flow even when operating with admin credentials or AI automation
2728
- Ensure lint/tests/build pass for touched areas
2829
5. If local repo policy conflicts with doctrine snapshot, follow local repo files and call out the conflict explicitly.

0 commit comments

Comments
 (0)