From d94adff48b1882f9078b0ae94b677be5d29e5fd2 Mon Sep 17 00:00:00 2001 From: casswedson <58050969+casswedson@users.noreply.github.com> Date: Sun, 18 Feb 2024 06:29:07 -0500 Subject: [PATCH] ci(labeler_issue): split on word boundaries Splitting it on word boundaries rather than only spaces allows for better detection. The issue labeler previously didn't catch titles such as `treesitter: noisy "Invalid node type" error`. Co-authored-by: casswedson --- .github/workflows/labeler_issue.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/labeler_issue.yml b/.github/workflows/labeler_issue.yml index 0da4c0f707..deba3cd5a5 100644 --- a/.github/workflows/labeler_issue.yml +++ b/.github/workflows/labeler_issue.yml @@ -13,7 +13,7 @@ jobs: with: script: | const title = context.payload.issue.title; - const titleSplit = title.split(/\s+/).map(e => e.toLowerCase()); + const titleSplit = title.split(/\b/).map(e => e.toLowerCase()); const keywords = ['api', 'treesitter', 'ui', 'lsp']; var match = new Set(); for (const keyword of keywords) {