diff --git a/.github/workflows/check-branch-conventions.yml b/.github/workflows/check-branch-conventions.yml index 3335a7cc..37a606d5 100644 --- a/.github/workflows/check-branch-conventions.yml +++ b/.github/workflows/check-branch-conventions.yml @@ -1,4 +1,4 @@ -name: Check Branch and PR Naming Conventions +name: PR Naming Conventions on: pull_request: @@ -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