Skip to content

Commit be06656

Browse files
Allow dev branch in validation, remove develop
Update git hooks and GitHub Actions workflow to allow the dev branch and remove support for develop for consistency. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 6ecca43 commit be06656

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

.githooks/pre-push.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Pre-push hook to validate branch naming conventions for Umbraco.Ai monorepo
22
# Valid patterns:
33
# - main
4-
# - develop
4+
# - dev
55
# - feature/<product>-<description>
66
# - release/<product>-<version>
77
# - hotfix/<product>-<version>
@@ -45,8 +45,8 @@ if ($products.Count -eq 0) {
4545
exit 1
4646
}
4747

48-
# Allow main and develop branches
49-
if ($currentBranch -eq "main" -or $currentBranch -eq "develop") {
48+
# Allow main and dev branches
49+
if ($currentBranch -eq "main" -or $currentBranch -eq "dev") {
5050
exit 0
5151
}
5252

@@ -84,7 +84,7 @@ if (-not $validBranch) {
8484
Write-Host ""
8585
Write-Host "Branch names must follow one of these patterns:"
8686
Write-Host " main"
87-
Write-Host " develop"
87+
Write-Host " dev"
8888
Write-Host " feature/<product>-<description>"
8989
Write-Host " release/<product>-<version>"
9090
Write-Host " hotfix/<product>-<version>"

.githooks/pre-push.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Pre-push hook to validate branch naming conventions for Umbraco.Ai monorepo
33
# Valid patterns:
44
# - main
5-
# - develop
5+
# - dev
66
# - feature/<product>-<description>
77
# - release/<product>-<version>
88
# - hotfix/<product>-<version>
@@ -48,8 +48,8 @@ if [ ${#products[@]} -eq 0 ]; then
4848
exit 1
4949
fi
5050

51-
# Allow main and develop branches
52-
if [ "$current_branch" = "main" ] || [ "$current_branch" = "develop" ]; then
51+
# Allow main and dev branches
52+
if [ "$current_branch" = "main" ] || [ "$current_branch" = "dev" ]; then
5353
exit 0
5454
fi
5555

@@ -96,7 +96,7 @@ if [ "$valid_branch" = false ]; then
9696
echo "" >&2
9797
echo "Branch names must follow one of these patterns:" >&2
9898
echo " main" >&2
99-
echo " develop" >&2
99+
echo " dev" >&2
100100
echo " feature/<product>-<description>" >&2
101101
echo " release/<product>-<version>" >&2
102102
echo " hotfix/<product>-<version>" >&2

.github/workflows/validate-branch.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ jobs:
5858
5959
echo "Discovered products: $PRODUCTS"
6060
61-
# Allow main and develop branches
62-
if [ "$BRANCH_NAME" == "main" ] || [ "$BRANCH_NAME" == "develop" ]; then
61+
# Allow main and dev branches
62+
if [ "$BRANCH_NAME" == "main" ] || [ "$BRANCH_NAME" == "dev" ]; then
6363
echo "✓ Valid branch: $BRANCH_NAME"
6464
exit 0
6565
fi
@@ -111,7 +111,7 @@ jobs:
111111
echo ""
112112
echo "Branch names must follow one of these patterns:"
113113
echo " main"
114-
echo " develop"
114+
echo " dev"
115115
echo " feature/<product>-<description>"
116116
echo " release/<product>-<version>"
117117
echo " hotfix/<product>-<version>"

0 commit comments

Comments
 (0)