Merged in feature/upDatepipelinesFile (pull request #963)

Added logic to capture failure status for invalid branch names

* Added logic to capture failure status for invalid branch names

* Merged dev into feature/upDatepipelinesFile
This commit is contained in:
Sujit Deokar
2026-04-17 12:15:30 +00:00
parent a936e0ce05
commit 1527fbc740
+41 -1
View File
@@ -321,7 +321,47 @@ pipelines:
done
echo "BLOCKED: target must be one of: ${ALLOWED}"; exit 1
- step: *ai-code-review
# -------------------------------------------------------------------------
# Catch-all: Enforce branch naming standards
# -------------------------------------------------------------------------
# Any branch that doesn't match the patterns above (feature/*, bugfix/*,
# hotfix/*, dev, stg) will match this catch-all. It fails immediately
# to enforce branch naming conventions.
#
# Allowed branch prefixes:
# • feature/* (new features)
# • bugfix/* (bug fixes)
# • hotfix/* (urgent production fixes)
# • dev (development integration)
# • stg (staging promotion)
# -------------------------------------------------------------------------
"**":
- step:
name: "Validate branch naming"
image: atlassian/default-image:4
script:
- |
echo "============================================================"
echo "BRANCH NAMING STANDARD VIOLATION"
echo "============================================================"
echo "Branch: ${BITBUCKET_PR_SOURCE_BRANCH}"
echo ""
echo "This branch does not match allowed naming conventions."
echo ""
echo "Allowed prefixes:"
echo " • feature/* — for new features"
echo " • bugfix/* — for bug fixes"
echo " • hotfix/* — for urgent production fixes"
echo ""
echo "Examples of valid branch names:"
echo " • feature/user-authentication"
echo " • bugfix/login-page-crash"
echo " • hotfix/security-patch"
echo ""
echo "Please rename your branch to match the standard and try again."
echo "============================================================"
exit 1
# ===========================================================================
# CUSTOM — manually triggered from the Bitbucket UI