File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -6,14 +6,18 @@ current_branch=$(git rev-parse --abbrev-ref HEAD)
66# Define a regular expression pattern to match the desired branch naming conventions
77feature_pattern=" ^feature/PI-[0-9]+[-][A-Za-z0-9\_]*$"
88release_pattern=" ^release/[0-9]{4}-[0-9]{2}-[0-9]{2}(-[a-z])?$"
9+ dependabot_pattern=" ^dependabot/.*"
910
1011if [[ $current_branch =~ $feature_pattern ]]; then
11- echo " The branch '$current_branch ' conforms to the feature branch pattern."
12- exit 0
12+ echo " The branch '$current_branch ' conforms to the feature branch pattern."
13+ exit 0
1314elif [[ $current_branch =~ $release_pattern ]]; then
14- echo " The branch '$current_branch ' conforms to the release branch pattern."
15- exit 0
15+ echo " The branch '$current_branch ' conforms to the release branch pattern."
16+ exit 0
17+ elif [[ $current_branch =~ $dependabot_pattern ]]; then
18+ echo " The branch '$current_branch ' conforms to the dependabot branch pattern."
19+ exit 0
1620else
17- echo " The branch '$current_branch ' does not conform to any of the allowed patterns."
18- exit 1
21+ echo " The branch '$current_branch ' does not conform to any of the allowed patterns."
22+ exit 1
1923fi
You can’t perform that action at this time.
0 commit comments