Skip to content

Feature/98 enforce linking to issue #2

Feature/98 enforce linking to issue

Feature/98 enforce linking to issue #2

name: Enforce Branch Naming
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
validate-branch-name:
runs-on: ubuntu-latest
steps:
- name: Check Branch Name
run: |
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
if [[ ! "$BRANCH_NAME" =~ ^(feature|bugfix|hotfix|release)\/[0-9]+ ]]; then
echo "❌ Invalid branch name: $BRANCH_NAME"
echo "✅ Expected: feature/123-description"
exit 1
fi