Skip to content

Commit 27256a2

Browse files
committed
Merge remote-tracking branch 'origin/feature/PI-880-dependabot_prs_run_through_pipeline' into release/2025-04-23
2 parents 6a30507 + 3f14b9f commit 27256a2

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

scripts/workflow/check-branch-name.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff 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
77
feature_pattern="^feature/PI-[0-9]+[-][A-Za-z0-9\_]*$"
88
release_pattern="^release/[0-9]{4}-[0-9]{2}-[0-9]{2}(-[a-z])?$"
9+
dependabot_pattern="^dependabot/.*"
910

1011
if [[ $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
1314
elif [[ $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
1620
else
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
1923
fi

0 commit comments

Comments
 (0)