From 469b855e4274b1def783b8bd14c7bb12a2bb515b Mon Sep 17 00:00:00 2001 From: Steven Palma Date: Wed, 17 Dec 2025 22:31:22 +0100 Subject: [PATCH] fix(ci): better heuristic + issue type template fix (#2672) * fix(ci): better heuristic + issue type template fix * chore(ci): remove keywords in performance tag --- .github/ISSUE_TEMPLATE/bug-report.yml | 19 ++----- .github/workflows/issue_labeler.yml | 72 +++++++++++---------------- 2 files changed, 33 insertions(+), 58 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index b46ed0cca..1b8095c4a 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -27,10 +27,10 @@ body: label: Issue Type description: What kind of ticket are you opening? options: - - label: "๐Ÿ› Bug Report (Something isn't working)" - - label: "๐Ÿ’ก Feature Request / Improvement" - - label: "โ“ Technical Question" - - label: "๐Ÿงน Maintenance / Documentation" + - "๐Ÿ› Bug Report (Something isn't working)" + - "๐Ÿ’ก Feature Request / Improvement" + - "โ“ Technical Question" + - "๐Ÿงน Maintenance / Documentation" validations: required: true @@ -60,26 +60,17 @@ body: - type: textarea id: context-repro - validations: - required: true attributes: label: Context & Reproduction description: | Provide a code snippet, steps to reproduce a bug, or technical details about your proposal. - Please use code blocks for logs and scripts. + Please use code blocks for scripts and CLI commands. placeholder: | Steps to reproduce / Usage example: 1. 2. 3. - - type: textarea - id: expected-behavior - attributes: - label: Expected Behavior / Desired Outcome - description: "Describe what you expected to happen or what the ideal solution looks like." - placeholder: "e.g. The script should finish without OOM, or I would like a new flag --fast-mode." - - type: textarea id: logs attributes: diff --git a/.github/workflows/issue_labeler.yml b/.github/workflows/issue_labeler.yml index 352819db1..49a06d05d 100644 --- a/.github/workflows/issue_labeler.yml +++ b/.github/workflows/issue_labeler.yml @@ -32,64 +32,48 @@ jobs: - uses: actions/github-script@v8 with: script: | - // Setup Input Text (Unified Title + Body) + // Setup Input Text const body = (context.payload.issue.body || ''); const title = (context.payload.issue.title || ''); - - // We keep a lowercased version for keyword matching - const text = `${title}\n${body}`.toLowerCase(); - + const cleanBody = body.replace(/```[\s\S]*?```/g, ''); + const text = `${title}\n${cleanBody}`.toLowerCase(); const labelsToAdd = new Set(); - - // Helper: Simple regex test const matches = (re) => re.test(text); - // Issue Type Detection (Dropdowns & Explicit Headers) - if (text.includes('bug report') || /\bissue type:.*bug/.test(text)) { - labelsToAdd.add('bug'); - } - if (text.includes('feature request') || /\bissue type:.*feature/.test(text)) { - labelsToAdd.add('enhancement'); - } - if (text.includes('technical question') || /\bissue type:.*question/.test(text)) { - labelsToAdd.add('question'); - } - if (text.includes('maintenance') || /\bissue type:.*maintenance/.test(text)) { - labelsToAdd.add('documentation'); - } - - // Keyword Heuristic + // Keyword Heuristics // Domain Specific - if (matches(/example(s)?\b|script(s)?\b|sample(s)?\b|demo(s)?\b|notebook(s)?\b/i)) labelsToAdd.add('examples'); - if (matches(/dataset(s)?\b|data loader|data augmentation|data preprocessing/i)) labelsToAdd.add('dataset'); - if (matches(/mujoco|isaac|\bsimulation\b|\bsim /i)) labelsToAdd.add('simulation'); - if (matches(/train|loss|optimizer|backward|gradient|wandb|sac\b/i)) labelsToAdd.add('training'); - if (matches(/rerun|plot|video|render|visualiz|gif/i)) labelsToAdd.add('visualization'); - if (matches(/camera|realsense|lidar|depth|sensor|imu|microphone|rgbd/i)) labelsToAdd.add('sensors'); - if (matches(/aloha|koch|so-100|so100|mobile|teleop|manipulator|robot(s)?\b/i)) labelsToAdd.add('robots'); - if (matches(/teleop|teleoperator|controller|leader|follower|joystick|gamepad/i)) labelsToAdd.add('teleoperators'); - if (matches(/policy|policies|p0licy/i)) labelsToAdd.add('policies'); - if (matches(/processor(s)?\b|implement.*processor|processor pipeline/i)) labelsToAdd.add('processor'); - if (matches(/eval|evaluate|evaluation|metric(s)?\b|score|benchmark/i)) labelsToAdd.add('evaluation'); + if (matches(/\b(bug|error|issue|fault|crash|exception|\b/i)) labelsToAdd.add('bug'); + if (matches(/\b(feature|enhancement|improvement|support|implement|proposal)\b/i)) labelsToAdd.add('enhancement'); + if (matches(/\b(question|help|how to||clarify|explain|unclear)\b/i)) labelsToAdd.add('question'); + if (matches(/\b(maintenance|documentation|docs|readme|tutorial|guide|wiki)\b/i)) labelsToAdd.add('documentation'); + if (matches(/\b(example|script|sample|demo|notebook)s?\b/i)) labelsToAdd.add('examples'); + if (matches(/\b(datasets?|data loader|data augmentation|data preprocessing)\b/i)) labelsToAdd.add('dataset'); + if (matches(/\b(mujoco|isaac|simulation|sim)\b/i)) labelsToAdd.add('simulation'); + if (matches(/\b(train|training|loss|optimizer|backward|gradient|wandb|sac)\b/i)) labelsToAdd.add('training'); + if (matches(/\b(rerun|plot|video|render|visualiz|gif)/i)) labelsToAdd.add('visualization'); + if (matches(/\b(camera|realsense|lidar|depth|sensor|imu|microphone|rgbd)\b/i)) labelsToAdd.add('sensors'); + if (matches(/\b(aloha|koch|so-100|so100|mobile|teleop|manipulator|robots?)\b/i)) labelsToAdd.add('robots'); + if (matches(/\b(teleop|teleoperator|controller|leader|follower|joystick|gamepad)\b/i)) labelsToAdd.add('teleoperators'); + if (matches(/\b(policy|policies|p0licy)\b/i)) labelsToAdd.add('policies'); + if (matches(/\b(processors?|pipeline)\b/i)) labelsToAdd.add('processor'); + if (matches(/\b(eval|evaluate|evaluation|metrics?|score|benchmark)\b/i)) labelsToAdd.add('evaluation'); // Infrastructure & Code Quality - if (matches(/test|pytest|unittest|failing test/i)) labelsToAdd.add('tests'); - if (matches(/ci|github actions|workflow|gha|action(s)?\b|pipeline/i)) { + if (matches(/\b(tests?|pytest|unittest|failing test)\b/i)) labelsToAdd.add('tests'); + if (matches(/\b(ci|github actions|workflow|gha|actions?|pipeline)\b/i)) { labelsToAdd.add('CI'); labelsToAdd.add('github_actions'); } - if (matches(/perf|latency|benchmark|throughput|fps|speed|performance|benchmarking/i)) labelsToAdd.add('performance'); - if (matches(/dependency|requirements|pip|conda|install error|importerror|package not found/i)) labelsToAdd.add('dependencies'); - if (matches(/python\b|pyproject|requirements(\.txt)?|pip install|typing error/i)) labelsToAdd.add('python'); + if (matches(/\b(perf|latency|throughput|fps|speed|performance)\b/i)) labelsToAdd.add('performance'); + if (matches(/\b(dependency|requirements|pip|conda|install error|importerror|package not found)\b/i)) labelsToAdd.add('dependencies'); + if (matches(/\b(python|pyproject|requirements(\.txt)?|pip install|typing error)\b/i)) labelsToAdd.add('python'); // Documentation & Meta - if (matches(/doc|documentation|docs|readme|typo|how to/i)) labelsToAdd.add('documentation'); - if (matches(/refactor|cleanup|restructure|rename|modernize code/i)) labelsToAdd.add('refactor'); - if (matches(/release|changelog|version bump|cut a release|tag v/i)) labelsToAdd.add('release'); - - // Fixed: "BREAKING CHANGE" must be lowercase in regex because 'text' is lowercase - if (matches(/breaking change|breaking:|major change/i)) labelsToAdd.add('breaking change'); + if (matches(/\b(doc|documentation|docs|readme|typo|how to)\b/i)) labelsToAdd.add('documentation'); + if (matches(/\b(refactor|cleanup|restructure|rename|modernize code)\b/i)) labelsToAdd.add('refactor'); + if (matches(/\b(release|changelog|version bump|cut a release|tag v)\b/i)) labelsToAdd.add('release'); + if (matches(/\b(breaking change|major change)\b/i)) labelsToAdd.add('breaking change'); // Apply Labels const labels = Array.from(labelsToAdd).filter(Boolean);