From 9e063b1784cf7382b8e98832d91eeb6902de344d Mon Sep 17 00:00:00 2001 From: Lup Yuen Lee Date: Sat, 21 Feb 2026 17:14:36 +0800 Subject: [PATCH] github/workflow: Fix the PR Labeling for Build System Our New PR Labeler incorrectly labels the Changed Files for Build System. Here is a Sample PR that contains changes for Arm32 CMake and Makefile: https://github.com/lupyuen6/nuttx/pull/59 ``` arch/arm/CMakeLists.txt arch/arm/Makefile ``` But our PR Labeler incorrectly labels the above as `Area: Build system, Arch: Arm`, which triggers a Complete CI Build across All Architectures (according to arch.yml). The correct label should be `Arch: Arm`, which will trigger only the Arm32 Build: https://github.com/lupyuen8/nuttx/pull/1 This PR fixes the PR Labeling. The New PR Labeler is explained here: - https://lupyuen.org/articles/prtarget - https://github.com/apache/nuttx/issues/18359 `.github/workflows/labeler.yml`: Changed the Regex Pattern. Now we match the Start Of Line and End Of Line. Signed-off-by: Lup Yuen Lee --- .github/workflows/labeler.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index da967babdae..a689cba53c2 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -108,7 +108,10 @@ jobs: .split('.').join('\\.') // . becomes \. .split('*').join('[^/]*') // * becomes [^/]* .split('[^/]*[^/]*').join('.*'); // ** becomes .* - archLabels.push({ label, pattern }); + archLabels.push({ + label, // Arch: arm + pattern: '^' + pattern + '$' // Match the Line Start and Line End + }); } else { // We don't support all rules of `actions/labeler`