Skip to content

Commit 0cacd49

Browse files
authored
Update branch-name-check.yml (#270)
# Pull Request ## Description Please describe what this PR does and why. ## Related Issues Closes #<issue-number> ## Checklist - [ ] Tests added - [ ] Docs updated - [ ] Follows contribution guidelines Thank you for contributing to **Selecro**! 🧶
1 parent 4c7392c commit 0cacd49

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/branch-name-check.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ jobs:
2020
exit 0
2121
fi
2222
23-
if [[ ! "$GITHUB_HEAD_REF" =~ ^(feature|fix|dependabot)/[a-z0-9._-]+$ ]]; then
24-
echo "❌ Invalid branch name. Use 'feature/*', 'fix/*', or 'dependabot/*'."
23+
if [[ ! "$GITHUB_HEAD_REF" =~ ^(feature|fix)/[a-z0-9._-]+$ \
24+
&& ! "$GITHUB_HEAD_REF" =~ ^dependabot/.+$ \
25+
&& ! "$GITHUB_HEAD_REF" =~ ^snyk-upgrade-[a-z0-9]+$ ]]; then
26+
echo "❌ Invalid branch name. Use 'feature/*', 'fix/*', 'dependabot/*', or 'snyk-upgrade-*'."
2527
exit 1
2628
fi
2729

0 commit comments

Comments
 (0)