diff --git a/.github/workflows/validate-pr.yml b/.github/workflows/validate-pr.yml index 73323ad6de2f..57130602aadb 100644 --- a/.github/workflows/validate-pr.yml +++ b/.github/workflows/validate-pr.yml @@ -62,6 +62,8 @@ jobs: # get major version prefix from the release branch ("27.x -> "27.") [[ "$GITHUB_BASE_REF" =~ ^\([0-9]*\.\) ]] && target_branch="${BASH_REMATCH[1]}" + env + if [[ "$GITHUB_BASE_REF" != "$branch" ]] && ! [[ "$GITHUB_BASE_REF" == "master" && "$branch" == "" ]]; then echo "::error::PR is opened against the $GITHUB_BASE_REF branch, but its title suggests otherwise." exit 1