Skip to content

chore(docs): reduce Ai sloppyness #3

chore(docs): reduce Ai sloppyness

chore(docs): reduce Ai sloppyness #3

Workflow file for this run

name: Check Source Branch
on:
pull_request:
branches:
- prod
types:
- opened
- synchronize
- reopened
- edited
jobs:
check-source-branch:
name: check-source-branch
runs-on: ubuntu-latest
steps:
- name: Check source branch
run: |
HEAD_BRANCH="${{ github.head_ref }}"
BASE_BRANCH="${{ github.base_ref }}"
echo "PR: ${HEAD_BRANCH} → ${BASE_BRANCH}"
if [ "$BASE_BRANCH" = "prod" ] && [ "$HEAD_BRANCH" != "develop" ]; then
echo "::error::Merging to 'prod' is only allowed from the 'develop' branch."
echo "::error::Source branch '${HEAD_BRANCH}' is not permitted."
exit 1
fi
echo "✅ Source branch '${HEAD_BRANCH}' is allowed to merge into '${BASE_BRANCH}'."