Skip to content

feat(ECOM-11): categoriess #10

feat(ECOM-11): categoriess

feat(ECOM-11): categoriess #10

## name of your github action
name: Branch Name Action
## when will the action trigger
on:
pull_request:
types:
- opened
- edited
- synchronize
- reopened
## the action script
jobs:
validate-branch-name:
runs-on: ubuntu-latest
steps:
- name: Validate Branch Name Format
shell: bash
run: |
BRANCH_NAME="${{ github.head_ref }}"
echo "Branch name: $BRANCH_NAME"
if [[ ! "$BRANCH_NAME" =~ ^(feature|bugfix|hotfix|release)/ECOM-[0-9]+/[A-Za-z0-9._ -]+$ ]]; then
echo "Invalid branch name format: $BRANCH_NAME"
echo "Required: <type>/ECOM-<TicketNum>/<task name>"
echo "Example: feature/ECOM-27/Add login screen"
exit 1
fi
echo "Branch name format is valid"