From 80289068169398655e2efd0e145c4f71d9046a0f Mon Sep 17 00:00:00 2001 From: King Joshua Montayre Date: Thu, 12 Mar 2026 22:34:36 +0800 Subject: [PATCH] Feature ID should get from PR and branch name and should check be case-insensitive --- action.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index ae417a2..94690ac 100644 --- a/action.yml +++ b/action.yml @@ -172,8 +172,11 @@ runs: fi elif [[ "$CHANNEL" == "fte" ]]; then echo "Running feature build" - # Get public name from PR title - ID=$(echo ${{ github.event.pull_request.title }} | grep -oP '\[MD-\K[0-9]+' || echo "") + # Get public name from PR title or branch name. Should be case-insensitive, e.g. MD-8118 or md-8118 + ID=$(echo ${{ github.event.pull_request.title }} | grep -ioP '(?i)(?:MD-)\K[0-9]+' | head -1 || echo "") + if [ -z "$ID" ]; then + ID=$(echo ${{ github.head_ref }} | grep -ioP '(?i)(?:MD-)\K[0-9]+' | head -1 || echo "") + fi echo "Got id $ID" if [ -z "$ID" ]; then