Skip to content

Commit

Permalink
fix release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
divhead committed Jan 1, 2025
1 parent 092bab8 commit 53606ec
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/check-branch-conventions.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check Branch and PR Naming Conventions
name: PR Naming Conventions

on:
pull_request:
Expand All @@ -20,20 +20,20 @@ jobs:
# Check for Release branches
if [[ "$branch_name" =~ ^release- ]]; then
if [[ ! "$pr_title" =~ ^Release: ]]; then
echo "Error: For 'release-*' branches, PR title must start with 'Release:'."
if [[ ! "$pr_title" =~ ^Release ]]; then
echo "Error: For 'release-*' branches, PR title must start with 'Release'."
exit 1
fi
# Check for Hotfix branches
elif [[ "$branch_name" =~ ^hotfix- ]]; then
if [[ ! "$pr_title" =~ ^Hotfix: ]]; then
echo "Error: For 'hotfix-*' branches, PR title must start with 'Hotfix:'."
if [[ ! "$pr_title" =~ ^Hotfix ]]; then
echo "Error: For 'hotfix-*' branches, PR title must start with 'Hotfix'."
exit 1
fi
else
echo "Error: Branch must start with 'release-' or 'hotfix-'."
echo "PRs in the master are only allowed from release-* or hotfix-* branches with the corresponding PR titles starting with Release or Hotfix."
exit 1
fi
Expand Down

0 comments on commit 53606ec

Please sign in to comment.