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 <luppy@appkaki.com>
This commit is contained in:
Lup Yuen Lee
2026-02-21 17:14:36 +08:00
parent c4d6b728a0
commit 9e063b1784
+4 -1
View File
@@ -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`