Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.
C aiderastclaude-codecode-analysiscode-intelligencecodexcursorcypherdeveloper-toolsgemini-cligraph-visualizationkilocodeknowledge-graphmcpmcp-servermodel-context-protocolopencodesqlitetree-sitterwindsurf
fix(ci): issue labeler no-oped on every issue — (?i) is invalid in JS RegExp
Martin Vogelfff4761d3722
diff --git a/.github/issue-labeler.yml b/.github/issue-labeler.ymlindex cf00bade1..e071d481c 100644--- a/.github/issue-labeler.yml+++ b/.github/issue-labeler.yml@@ -1,17 +1,21 @@-# Config for github/issue-labeler (.github/workflows/issue-labeler.yml).-# Non-versioned format: one regex per label, matched against title + body.+# Config for the Issue area labeler (.github/workflows/issue-labeler.yml).+# FORMAT (parsed line-wise by the workflow): one rule per line, exactly+# "label": 'regex'+# Patterns are compiled as JavaScript RegExp with the `i` flag applied by+# the workflow — do NOT use PCRE-only syntax like inline `(?i)` groups+# (that broke every run, #764). Matched against issue title + body.# Additive only — these never remove a maintainer's manual label.-"windows": '(?i)\b(windows|win\s?1[01]|powershell|\.ps1|mapped drive|smb share|unc path)\b'+"windows": '\b(windows|win\s?1[01]|powershell|\.ps1|mapped drive|smb share|unc path)\b'-"stability/performance": '(?i)(out of memory|\boom\b|memory leak|segfault|sigsegv|sigbus|crash(es|ed|ing)?|core dumped|\bhang(s|ing)?\b|deadlock|freezes?|time(s)?\s?out|timeout|never finishes|cgroup)'+"stability/performance": '(out of memory|\boom\b|memory leak|segfault|sigsegv|sigbus|crash(es|ed|ing)?|core dumped|\bhang(s|ing)?\b|deadlock|freezes?|time(s)?\s?out|timeout|never finishes|cgroup)'-"parsing/quality": '(?i)(trace_path|query_graph|search_graph|calls? edge|missing (edges|nodes)|false positive|zero edges|0 edges|module node|not indexed|extraction|wrong (node|label))'+"parsing/quality": '(trace_path|query_graph|search_graph|calls? edge|missing (edges|nodes)|false positive|zero edges|0 edges|module node|not indexed|extraction|wrong (node|label))'-"editor/integration": '(?i)(cursor|vscode|vs code|opencode|codex|claude code|gemini cli|antigravity|mcp client|\.mcp\.json|installer)'+"editor/integration": '(cursor|vscode|vs code|opencode|codex|claude code|gemini cli|antigravity|mcp client|\.mcp\.json|installer)'-"ux/behavior": '(?i)(web ui|\bui\b|dashboard|3d graph|visuali[sz]ation|watcher|project name|frontend)'+"ux/behavior": '(web ui|\bui\b|dashboard|3d graph|visuali[sz]ation|watcher|project name|frontend)'-"cypher": '(?i)\bcypher\b'+"cypher": '\bcypher\b'-"language-request": '(?i)(language support|hybrid lsp|new language support|support for \w+ language)'+"language-request": '(language support|hybrid lsp|new language support|support for \w+ language)'diff --git a/.github/workflows/issue-labeler.yml b/.github/workflows/issue-labeler.ymlindex 2c0b77794..1cd544a9d 100644--- a/.github/workflows/issue-labeler.yml+++ b/.github/workflows/issue-labeler.yml@@ -1,9 +1,15 @@name: Issue area labeler# Adds area labels to new/edited issues based on keyword regexes in-# .github/issue-labeler.yml. Additive only (sync-labels off): it never-# removes a label a maintainer set by hand. Base bug/enhancement labels-# already come from the issue forms.+# .github/issue-labeler.yml. Additive only (addLabels never removes): it+# never touches a label a maintainer set by hand. Base bug/enhancement+# labels already come from the issue forms.+#+# Implemented with first-party actions/github-script (not a third-party+# labeler action) so every pattern is compiled as a JavaScript RegExp with+# the `i` flag applied centrally — inline `(?i)` groups are PCRE-only and+# threw `SyntaxError: Invalid group` on every issue (#764). A pattern that+# fails to compile now fails the run loudly instead of silently no-oping.on:issues:@@ -16,13 +22,38 @@ jobs:triage:runs-on: ubuntu-latestpermissions:+ contents: readissues: writesteps:- - uses: github/issue-labeler@c1b0f9f52a63158c4adc09425e858e87b32e9685 # v3.4+ - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0+ - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0with:- configuration-path: .github/issue-labeler.yml- enable-versioned-regex: 0- include-title: 1- include-body: 1- sync-labels: 0- repo-token: ${{ secrets.GITHUB_TOKEN }}+ script: |+ const fs = require('fs');+ const text = [context.payload.issue.title, context.payload.issue.body]+ .filter(Boolean).join('\n');+ const rules = [];+ const bad = [];+ // Config format: one rule per line — "label": 'regex' (see the+ // header comment in .github/issue-labeler.yml).+ for (const line of fs.readFileSync('.github/issue-labeler.yml', 'utf8').split('\n')) {+ const m = line.match(/^"([^"]+)":\s*'(.*)'\s*$/);+ if (!m) continue;+ try { rules.push({ label: m[1], re: new RegExp(m[2], 'i') }); }+ catch (e) { bad.push(`${m[1]}: ${e.message}`); }+ }+ if (rules.length === 0 && bad.length === 0) {+ core.setFailed('no labeling rules parsed from .github/issue-labeler.yml');+ return;+ }+ const labels = rules.filter(r => r.re.test(text)).map(r => r.label);+ if (labels.length) {+ await github.rest.issues.addLabels({+ owner: context.repo.owner,+ repo: context.repo.repo,+ issue_number: context.issue.number,+ labels,+ });+ }+ core.info(`matched: ${labels.join(', ') || '(none)'}`);+ if (bad.length) core.setFailed(`invalid label regex(es): ${bad.join('; ')}`);