From ccd6ae42bec9cd12ec9e1c59a59e6ebc01190e68 Mon Sep 17 00:00:00 2001 From: Zhiwei Yin Date: Mon, 9 Mar 2026 16:20:03 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Align=20PR=20title=20verifier=20?= =?UTF-8?q?prefixes=20with=20pull=5Frequest=5Ftemplate.md=20(#1417)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Docker image gcr.io/kubebuilder/pr-verifier:v0.4.3 used by kubernetes-sigs/kubebuilder-release-tools has been removed from GCR as of March 2025. Replace it with an inline shell script that validates PR title format, matching the prefixes defined in pull_request_template.md. Both emoji shortcodes (e.g. :bug:) and unicode emoji are accepted. Signed-off-by: Zhiwei Yin Co-authored-by: Claude Opus 4.6 (1M context) --- .github/workflows/pr-verify.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr-verify.yml b/.github/workflows/pr-verify.yml index 049db4221..61180b84e 100644 --- a/.github/workflows/pr-verify.yml +++ b/.github/workflows/pr-verify.yml @@ -21,15 +21,16 @@ jobs: exit 1 fi - if ! [[ "$TITLE" =~ ^($'\u26A0'|$'\u2728'|$'\U0001F41B'|$'\U0001F4D6'|$'\U0001F680'|$'\U0001F331') ]]; then + if ! [[ "$TITLE" =~ ^(:sparkles:|:bug:|:book:|:memo:|:warning:|:seedling:|:question:|$'\u2728'|$'\U0001F41B'|$'\U0001F4D6'|$'\U0001F4DD'|$'\u26A0'$'\uFE0F'?|$'\U0001F331'|$'\u2753') ]]; then echo "Error: Invalid PR title format." echo "Your PR title must start with one of the following indicators:" - echo "- Breaking change: ⚠ (U+26A0)" - echo "- Non-breaking feature: ✨ (U+2728)" - echo "- Patch fix: 🐛 (U+1F41B)" - echo "- Docs: 📖 (U+1F4D6)" - echo "- Release: 🚀 (U+1F680)" - echo "- Infra/Tests/Other: 🌱 (U+1F331)" + echo "- :sparkles: ✨ feature" + echo "- :bug: 🐛 bug fix" + echo "- :book: 📖 docs" + echo "- :memo: 📝 proposal" + echo "- :warning: ⚠️ breaking change" + echo "- :seedling: 🌱 other/misc" + echo "- :question: ❓ requires manual review" exit 1 fi