From ec2df021bc2ec8dc774c62c85ad050c7f5c7cb6a Mon Sep 17 00:00:00 2001 From: saladday <1203511142@qq.com> Date: Sat, 19 Sep 2026 23:03:14 +0800 Subject: [PATCH 1/4] chore: define issue triage labels and collaborator-only guidance --- .github/ISSUE_TEMPLATE/01-bug-report.yml | 2 +- .github/ISSUE_TEMPLATE/02-feature-request.yml | 2 +- .github/ISSUE_TEMPLATE/03-question.yml | 2 +- .github/ISSUE_TEMPLATE/config.yml | 3 +++ .github/ISSUE_TEMPLATE/docs.yml | 1 + docs/maintainers.md | 22 +++++++++++++++++++ test/source-sync.test.mjs | 15 +++++++++++++ 7 files changed, 44 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/01-bug-report.yml b/.github/ISSUE_TEMPLATE/01-bug-report.yml index 58f563774..980c7ee99 100644 --- a/.github/ISSUE_TEMPLATE/01-bug-report.yml +++ b/.github/ISSUE_TEMPLATE/01-bug-report.yml @@ -1,7 +1,7 @@ name: Bug report description: Report a reproducible problem with the Desktop app, CLI, or source build. title: "[Bug]: " -labels: ["bug"] +labels: ["bug", "needs-triage"] body: - type: markdown attributes: diff --git a/.github/ISSUE_TEMPLATE/02-feature-request.yml b/.github/ISSUE_TEMPLATE/02-feature-request.yml index b2a5875c8..7d8c4d279 100644 --- a/.github/ISSUE_TEMPLATE/02-feature-request.yml +++ b/.github/ISSUE_TEMPLATE/02-feature-request.yml @@ -1,7 +1,7 @@ name: Feature request description: Suggest an improvement to the Desktop app, CLI, or source distribution. title: "[Feature]: " -labels: ["enhancement"] +labels: ["enhancement", "needs-triage"] body: - type: dropdown id: product diff --git a/.github/ISSUE_TEMPLATE/03-question.yml b/.github/ISSUE_TEMPLATE/03-question.yml index 6ec6aef52..474da975d 100644 --- a/.github/ISSUE_TEMPLATE/03-question.yml +++ b/.github/ISSUE_TEMPLATE/03-question.yml @@ -1,7 +1,7 @@ name: Usage question description: Ask about the Desktop app, CLI, or building from source. title: "[Question]: " -labels: ["question"] +labels: ["question", "needs-triage"] body: - type: dropdown id: product diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index e224f2597..27fe16a2c 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,8 @@ blank_issues_enabled: false contact_links: + - name: Contribution policy + url: https://github.com/MiniMax-AI/minimax-code/blob/main/CONTRIBUTING.md + about: Everyone may report issues and suggest improvements. Pull requests are accepted only from repository collaborators; external PRs are not accepted. - name: CLI quick start and troubleshooting url: https://agent.minimax.io/docs/cli/quick-start about: Installation, account regions, first tasks, and links to troubleshooting. diff --git a/.github/ISSUE_TEMPLATE/docs.yml b/.github/ISSUE_TEMPLATE/docs.yml index 1923400d2..1982f5826 100644 --- a/.github/ISSUE_TEMPLATE/docs.yml +++ b/.github/ISSUE_TEMPLATE/docs.yml @@ -1,6 +1,7 @@ name: Documentation issue description: Report missing, incorrect, or unclear documentation. title: "[Docs] " +labels: ["documentation", "needs-triage"] body: - type: input id: location diff --git a/docs/maintainers.md b/docs/maintainers.md index 8056c4eef..e37664862 100644 --- a/docs/maintainers.md +++ b/docs/maintainers.md @@ -11,6 +11,28 @@ These are repository maintenance responsibilities, not an assertion that an account owns the product's copyright. Every PR that requires approval needs a reviewer other than the author, and security reports need a working private response path. Review maintainer additions and policy changes in a PR; do not silently grant repository access. +## Issue triage + +Everyone may report bugs, request features, ask questions, and flag documentation problems. Code and documentation PRs are accepted only from repository collaborators. Opening an issue or having a proposal accepted does not grant collaborator access or permission to submit a PR. Do not use `good first issue` or `help wanted` while external PRs are closed. + +Use these labels independently: + +| Category | Labels and meaning | +| --- | --- | +| Type | `bug`: reported malfunction; `enhancement`: requested improvement; `documentation`: missing or incorrect docs; `question`: usage or project-policy question | +| Product | `desktop`: Desktop app and its bundled runtime; `cli`: standalone mcode, including TUI, headless and ACP; `repository`: source builds, repository tooling and contribution process | +| Triage | `needs-triage`: awaiting maintainer assessment; `needs-info`: a maintainer has asked the reporter for specific missing information | +| Urgency | `priority:high`: maintainer-confirmed data loss or a blocker of a core workflow; use sparingly | + +1. Start with [needs-triage](https://github.com/MiniMax-AI/minimax-code/issues?q=is%3Aissue+is%3Aopen+label%3Aneeds-triage) and [unlabelled issues](https://github.com/MiniMax-AI/minimax-code/issues?q=is%3Aissue+is%3Aopen+no%3Alabel). Templates add a type and `needs-triage`; reports created through other routes may need both added manually. A type label describes the report and does not confirm a defect or commit to implementation. +2. Confirm one primary type and add the product label from the report. Product dropdowns remain in the issue body; maintainers apply these labels manually. Use multiple product labels only when the report establishes that each is affected. Use `repository` for repository docs and `desktop` or `cli` for product docs. The existing `tui` label may supplement `cli` for interactive-terminal-specific issues; it does not cover headless or ACP. +3. If information is missing, ask for the specific version, reproduction, or expected behavior, replace `needs-triage` with `needs-info`, and retain any known type/product labels. When the reporter replies, remove `needs-info` and reassess. Do not automatically close issues for inactivity. +4. Once assessed, remove `needs-triage` and record the next step in a comment. Assign a collaborator when someone takes responsibility; classification alone does not promise a fix or release date. For duplicates, link the original issue before closing with `duplicate`. For declined requests, explain the reason before closing with `wontfix`. + +Route security reports through [Security](../SECURITY.md). Do not ask for secrets or unredacted logs in public issues. Label setup is a separate repository operation: ensure the labels above exist before merging template changes, since forms cannot create missing labels. The Feishu workflow sends notifications only; it does not perform triage. + +This small label set follows the type/area distinction in [VS Code's triage guide](https://github.com/microsoft/vscode/wiki/Issues-Triaging) and the `needs-triage`/`needs-info` states used by [Ruff](https://github.com/astral-sh/ruff/labels). Contribution eligibility follows this repository's policy. + ## Review and merge 1. Repository collaborators open an issue for substantial scope or submit a focused feature-branch PR. Other users may open issues to discuss ideas and proposals. Security details follow the private reporting process. diff --git a/test/source-sync.test.mjs b/test/source-sync.test.mjs index c1085e1aa..3a229f504 100644 --- a/test/source-sync.test.mjs +++ b/test/source-sync.test.mjs @@ -440,6 +440,21 @@ test('public support forms preserve destination URLs and separate Desktop from C assert.equal(classifyChanges(['README_ZH.md', 'README.md']).docsOnly, true); }); +test('issue forms label incoming reports for triage and retain collaborator-only PR guidance', () => { + for (const [name, type] of [ + ['01-bug-report.yml', 'bug'], ['02-feature-request.yml', 'enhancement'], + ['03-question.yml', 'question'], ['docs.yml', 'documentation'], + ]) { + const form = parseYaml(readFileSync(new URL(`../.github/ISSUE_TEMPLATE/${name}`, import.meta.url), 'utf8')); + assert.deepEqual(form.labels, [type, 'needs-triage']); + } + const config = parseYaml(readFileSync(new URL('../.github/ISSUE_TEMPLATE/config.yml', import.meta.url), 'utf8')); + assert.equal(config.blank_issues_enabled, false); + const policy = config.contact_links.find(link => link.url.endsWith('/CONTRIBUTING.md')); + assert.match(policy.about, /only from repository collaborators/); + assert.match(policy.about, /external PRs are not accepted/); +}); + test('issue notification is restricted to public destination events and builds payloads offline', t => { const workflow = parseYaml(readFileSync(new URL('../.github/workflows/sync-issue-to-feishu.yml', import.meta.url), 'utf8')); assert.deepEqual(workflow.on, { issues: { types: ['opened'] } }); From 24c744c1d1aaf542fe5a307c51d6a2d9f3920b25 Mon Sep 17 00:00:00 2001 From: saladday <1203511142@qq.com> Date: Sat, 19 Sep 2026 23:23:26 +0800 Subject: [PATCH 2/4] chore: scope issue intake to the standalone CLI --- .github/ISSUE_TEMPLATE/01-bug-report.yml | 12 +++--------- .github/ISSUE_TEMPLATE/02-feature-request.yml | 5 ++--- .github/ISSUE_TEMPLATE/03-question.yml | 5 ++--- docs/maintainers.md | 10 +++++----- test/source-sync.test.mjs | 11 ++++++----- 5 files changed, 18 insertions(+), 25 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/01-bug-report.yml b/.github/ISSUE_TEMPLATE/01-bug-report.yml index 980c7ee99..89ca6d55b 100644 --- a/.github/ISSUE_TEMPLATE/01-bug-report.yml +++ b/.github/ISSUE_TEMPLATE/01-bug-report.yml @@ -1,5 +1,5 @@ name: Bug report -description: Report a reproducible problem with the Desktop app, CLI, or source build. +description: Report a reproducible problem with the CLI or source build. title: "[Bug]: " labels: ["bug", "needs-triage"] body: @@ -9,9 +9,8 @@ body: - type: dropdown id: product attributes: - label: Product or interface + label: CLI interface or source build options: - - Desktop app - CLI - interactive TUI - CLI - headless - CLI - ACP @@ -22,7 +21,7 @@ body: id: version attributes: label: Version - description: Desktop Settings version, mcode --version, or source commit. For source builds, also include Node.js and pnpm versions. + description: Include mcode --version or the source commit, plus Node.js and pnpm versions. validations: required: true - type: dropdown @@ -60,11 +59,6 @@ body: - Other validations: required: true - - type: input - id: upload-id - attributes: - label: Desktop log upload ID (optional) - description: For Desktop only, include an existing ID from Settings → General → Upload logs if available. CLI and source-build reports do not require an upload. Do not paste account credentials or raw session files. - type: textarea id: steps attributes: diff --git a/.github/ISSUE_TEMPLATE/02-feature-request.yml b/.github/ISSUE_TEMPLATE/02-feature-request.yml index 7d8c4d279..b41c15939 100644 --- a/.github/ISSUE_TEMPLATE/02-feature-request.yml +++ b/.github/ISSUE_TEMPLATE/02-feature-request.yml @@ -1,14 +1,13 @@ name: Feature request -description: Suggest an improvement to the Desktop app, CLI, or source distribution. +description: Suggest an improvement to the CLI or source distribution. title: "[Feature]: " labels: ["enhancement", "needs-triage"] body: - type: dropdown id: product attributes: - label: Product or interface + label: CLI interface or source build options: - - Desktop app - CLI - interactive TUI - CLI - headless - CLI - ACP diff --git a/.github/ISSUE_TEMPLATE/03-question.yml b/.github/ISSUE_TEMPLATE/03-question.yml index 474da975d..fa38ae18d 100644 --- a/.github/ISSUE_TEMPLATE/03-question.yml +++ b/.github/ISSUE_TEMPLATE/03-question.yml @@ -1,14 +1,13 @@ name: Usage question -description: Ask about the Desktop app, CLI, or building from source. +description: Ask about the CLI or building from source. title: "[Question]: " labels: ["question", "needs-triage"] body: - type: dropdown id: product attributes: - label: Product or interface + label: CLI interface or source build options: - - Desktop app - CLI - interactive TUI - CLI - headless - CLI - ACP diff --git a/docs/maintainers.md b/docs/maintainers.md index e37664862..2110fe80c 100644 --- a/docs/maintainers.md +++ b/docs/maintainers.md @@ -13,6 +13,8 @@ These are repository maintenance responsibilities, not an assertion that an acco ## Issue triage +This repository covers the standalone CLI (interactive TUI, headless and ACP) and its source builds and tooling. Use that scope for new reports; Desktop app support is outside this repository. Leave historical Desktop reports in place for maintainer follow-up. + Everyone may report bugs, request features, ask questions, and flag documentation problems. Code and documentation PRs are accepted only from repository collaborators. Opening an issue or having a proposal accepted does not grant collaborator access or permission to submit a PR. Do not use `good first issue` or `help wanted` while external PRs are closed. Use these labels independently: @@ -20,18 +22,16 @@ Use these labels independently: | Category | Labels and meaning | | --- | --- | | Type | `bug`: reported malfunction; `enhancement`: requested improvement; `documentation`: missing or incorrect docs; `question`: usage or project-policy question | -| Product | `desktop`: Desktop app and its bundled runtime; `cli`: standalone mcode, including TUI, headless and ACP; `repository`: source builds, repository tooling and contribution process | | Triage | `needs-triage`: awaiting maintainer assessment; `needs-info`: a maintainer has asked the reporter for specific missing information | -| Urgency | `priority:high`: maintainer-confirmed data loss or a blocker of a core workflow; use sparingly | 1. Start with [needs-triage](https://github.com/MiniMax-AI/minimax-code/issues?q=is%3Aissue+is%3Aopen+label%3Aneeds-triage) and [unlabelled issues](https://github.com/MiniMax-AI/minimax-code/issues?q=is%3Aissue+is%3Aopen+no%3Alabel). Templates add a type and `needs-triage`; reports created through other routes may need both added manually. A type label describes the report and does not confirm a defect or commit to implementation. -2. Confirm one primary type and add the product label from the report. Product dropdowns remain in the issue body; maintainers apply these labels manually. Use multiple product labels only when the report establishes that each is affected. Use `repository` for repository docs and `desktop` or `cli` for product docs. The existing `tui` label may supplement `cli` for interactive-terminal-specific issues; it does not cover headless or ACP. -3. If information is missing, ask for the specific version, reproduction, or expected behavior, replace `needs-triage` with `needs-info`, and retain any known type/product labels. When the reporter replies, remove `needs-info` and reassess. Do not automatically close issues for inactivity. +2. Confirm one primary type. Read the CLI interface, version and source-build context from the report; a separate product-label layer is unnecessary for this CLI-only repository. +3. If information is missing, ask for the specific version, reproduction, or expected behavior, replace `needs-triage` with `needs-info`, and retain the known type label. When the reporter replies, remove `needs-info` and reassess. Do not automatically close issues for inactivity. 4. Once assessed, remove `needs-triage` and record the next step in a comment. Assign a collaborator when someone takes responsibility; classification alone does not promise a fix or release date. For duplicates, link the original issue before closing with `duplicate`. For declined requests, explain the reason before closing with `wontfix`. Route security reports through [Security](../SECURITY.md). Do not ask for secrets or unredacted logs in public issues. Label setup is a separate repository operation: ensure the labels above exist before merging template changes, since forms cannot create missing labels. The Feishu workflow sends notifications only; it does not perform triage. -This small label set follows the type/area distinction in [VS Code's triage guide](https://github.com/microsoft/vscode/wiki/Issues-Triaging) and the `needs-triage`/`needs-info` states used by [Ruff](https://github.com/astral-sh/ruff/labels). Contribution eligibility follows this repository's policy. +This small label set draws on the type and information-request handling in [VS Code's triage guide](https://github.com/microsoft/vscode/wiki/Issues-Triaging) and the `needs-triage`/`needs-info` states used by [Ruff](https://github.com/astral-sh/ruff/labels). Contribution eligibility follows this repository's policy. ## Review and merge diff --git a/test/source-sync.test.mjs b/test/source-sync.test.mjs index 3a229f504..248081750 100644 --- a/test/source-sync.test.mjs +++ b/test/source-sync.test.mjs @@ -421,20 +421,21 @@ test('suite runner preserves gate arguments and canonicalizes Windows temporary } }); -test('public support forms preserve destination URLs and separate Desktop from CLI reports', () => { +test('public support forms cover only CLI interfaces and source builds', () => { const forms = ['01-bug-report.yml', '02-feature-request.yml', '03-question.yml']; for (const name of forms) { const form = parseYaml(readFileSync(new URL(`../.github/ISSUE_TEMPLATE/${name}`, import.meta.url), 'utf8')); const product = form.body.find(field => field.id === 'product'); assert.equal(product.validations.required, true); - assert.ok(product.attributes.options.includes('Desktop app')); - assert.ok(product.attributes.options.includes('CLI - ACP')); - assert.ok(product.attributes.options.includes('CLI - headless')); + assert.deepEqual(product.attributes.options, [ + 'CLI - interactive TUI', 'CLI - headless', 'CLI - ACP', 'Source build or repository tooling', + ]); + assert.doesNotMatch(JSON.stringify(form), /Desktop/); const ids = form.body.filter(field => field.id).map(field => field.id); assert.equal(new Set(ids).size, ids.length); } const bug = parseYaml(readFileSync(new URL('../.github/ISSUE_TEMPLATE/01-bug-report.yml', import.meta.url), 'utf8')); - assert.notEqual(bug.body.find(field => field.id === 'upload-id').validations?.required, true); + assert.equal(bug.body.find(field => field.id === 'upload-id'), undefined); for (const retired of ['bug.yml', 'feature.yml']) assert.equal(existsSync(new URL(`../.github/ISSUE_TEMPLATE/${retired}`, import.meta.url)), false); assert.equal(classifyChanges(['README_ZH.md', 'README.md']).docsOnly, true); From 91d814ae89dcc95a090973f1c91102b6d91a278b Mon Sep 17 00:00:00 2001 From: saladday <1203511142@qq.com> Date: Sat, 19 Sep 2026 23:29:54 +0800 Subject: [PATCH 3/4] chore: retain Desktop feedback alongside CLI source support --- .github/ISSUE_TEMPLATE/01-bug-report.yml | 12 +++++++++--- .github/ISSUE_TEMPLATE/02-feature-request.yml | 5 +++-- .github/ISSUE_TEMPLATE/03-question.yml | 5 +++-- docs/maintainers.md | 7 ++++--- test/source-sync.test.mjs | 11 +++++------ 5 files changed, 24 insertions(+), 16 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/01-bug-report.yml b/.github/ISSUE_TEMPLATE/01-bug-report.yml index 89ca6d55b..980c7ee99 100644 --- a/.github/ISSUE_TEMPLATE/01-bug-report.yml +++ b/.github/ISSUE_TEMPLATE/01-bug-report.yml @@ -1,5 +1,5 @@ name: Bug report -description: Report a reproducible problem with the CLI or source build. +description: Report a reproducible problem with the Desktop app, CLI, or source build. title: "[Bug]: " labels: ["bug", "needs-triage"] body: @@ -9,8 +9,9 @@ body: - type: dropdown id: product attributes: - label: CLI interface or source build + label: Product or interface options: + - Desktop app - CLI - interactive TUI - CLI - headless - CLI - ACP @@ -21,7 +22,7 @@ body: id: version attributes: label: Version - description: Include mcode --version or the source commit, plus Node.js and pnpm versions. + description: Desktop Settings version, mcode --version, or source commit. For source builds, also include Node.js and pnpm versions. validations: required: true - type: dropdown @@ -59,6 +60,11 @@ body: - Other validations: required: true + - type: input + id: upload-id + attributes: + label: Desktop log upload ID (optional) + description: For Desktop only, include an existing ID from Settings → General → Upload logs if available. CLI and source-build reports do not require an upload. Do not paste account credentials or raw session files. - type: textarea id: steps attributes: diff --git a/.github/ISSUE_TEMPLATE/02-feature-request.yml b/.github/ISSUE_TEMPLATE/02-feature-request.yml index b41c15939..7d8c4d279 100644 --- a/.github/ISSUE_TEMPLATE/02-feature-request.yml +++ b/.github/ISSUE_TEMPLATE/02-feature-request.yml @@ -1,13 +1,14 @@ name: Feature request -description: Suggest an improvement to the CLI or source distribution. +description: Suggest an improvement to the Desktop app, CLI, or source distribution. title: "[Feature]: " labels: ["enhancement", "needs-triage"] body: - type: dropdown id: product attributes: - label: CLI interface or source build + label: Product or interface options: + - Desktop app - CLI - interactive TUI - CLI - headless - CLI - ACP diff --git a/.github/ISSUE_TEMPLATE/03-question.yml b/.github/ISSUE_TEMPLATE/03-question.yml index fa38ae18d..474da975d 100644 --- a/.github/ISSUE_TEMPLATE/03-question.yml +++ b/.github/ISSUE_TEMPLATE/03-question.yml @@ -1,13 +1,14 @@ name: Usage question -description: Ask about the CLI or building from source. +description: Ask about the Desktop app, CLI, or building from source. title: "[Question]: " labels: ["question", "needs-triage"] body: - type: dropdown id: product attributes: - label: CLI interface or source build + label: Product or interface options: + - Desktop app - CLI - interactive TUI - CLI - headless - CLI - ACP diff --git a/docs/maintainers.md b/docs/maintainers.md index 2110fe80c..23b709825 100644 --- a/docs/maintainers.md +++ b/docs/maintainers.md @@ -13,7 +13,7 @@ These are repository maintenance responsibilities, not an assertion that an acco ## Issue triage -This repository covers the standalone CLI (interactive TUI, headless and ACP) and its source builds and tooling. Use that scope for new reports; Desktop app support is outside this repository. Leave historical Desktop reports in place for maintainer follow-up. +Published source covers the standalone CLI (interactive TUI, headless and ACP). The issue tracker also collects Desktop app feedback; accepting those reports does not expand the published source scope. Everyone may report bugs, request features, ask questions, and flag documentation problems. Code and documentation PRs are accepted only from repository collaborators. Opening an issue or having a proposal accepted does not grant collaborator access or permission to submit a PR. Do not use `good first issue` or `help wanted` while external PRs are closed. @@ -22,11 +22,12 @@ Use these labels independently: | Category | Labels and meaning | | --- | --- | | Type | `bug`: reported malfunction; `enhancement`: requested improvement; `documentation`: missing or incorrect docs; `question`: usage or project-policy question | +| Product | `desktop`: Desktop app; `cli`: standalone mcode, including TUI, headless, ACP and its source builds/tooling | | Triage | `needs-triage`: awaiting maintainer assessment; `needs-info`: a maintainer has asked the reporter for specific missing information | 1. Start with [needs-triage](https://github.com/MiniMax-AI/minimax-code/issues?q=is%3Aissue+is%3Aopen+label%3Aneeds-triage) and [unlabelled issues](https://github.com/MiniMax-AI/minimax-code/issues?q=is%3Aissue+is%3Aopen+no%3Alabel). Templates add a type and `needs-triage`; reports created through other routes may need both added manually. A type label describes the report and does not confirm a defect or commit to implementation. -2. Confirm one primary type. Read the CLI interface, version and source-build context from the report; a separate product-label layer is unnecessary for this CLI-only repository. -3. If information is missing, ask for the specific version, reproduction, or expected behavior, replace `needs-triage` with `needs-info`, and retain the known type label. When the reporter replies, remove `needs-info` and reassess. Do not automatically close issues for inactivity. +2. Confirm one primary type and apply `desktop` or `cli` from the report. Product dropdowns stay in the body; maintainers apply product labels manually. Use both only when the report establishes that both are affected. Leave product labels unset for unclear reports or repository-policy questions. The existing `tui` label may supplement `cli` for interactive-terminal-specific issues; it does not cover headless or ACP. +3. If information is missing, ask for the specific version, reproduction, or expected behavior, replace `needs-triage` with `needs-info`, and retain any known type/product labels. When the reporter replies, remove `needs-info` and reassess. Do not automatically close issues for inactivity. 4. Once assessed, remove `needs-triage` and record the next step in a comment. Assign a collaborator when someone takes responsibility; classification alone does not promise a fix or release date. For duplicates, link the original issue before closing with `duplicate`. For declined requests, explain the reason before closing with `wontfix`. Route security reports through [Security](../SECURITY.md). Do not ask for secrets or unredacted logs in public issues. Label setup is a separate repository operation: ensure the labels above exist before merging template changes, since forms cannot create missing labels. The Feishu workflow sends notifications only; it does not perform triage. diff --git a/test/source-sync.test.mjs b/test/source-sync.test.mjs index 248081750..3a229f504 100644 --- a/test/source-sync.test.mjs +++ b/test/source-sync.test.mjs @@ -421,21 +421,20 @@ test('suite runner preserves gate arguments and canonicalizes Windows temporary } }); -test('public support forms cover only CLI interfaces and source builds', () => { +test('public support forms preserve destination URLs and separate Desktop from CLI reports', () => { const forms = ['01-bug-report.yml', '02-feature-request.yml', '03-question.yml']; for (const name of forms) { const form = parseYaml(readFileSync(new URL(`../.github/ISSUE_TEMPLATE/${name}`, import.meta.url), 'utf8')); const product = form.body.find(field => field.id === 'product'); assert.equal(product.validations.required, true); - assert.deepEqual(product.attributes.options, [ - 'CLI - interactive TUI', 'CLI - headless', 'CLI - ACP', 'Source build or repository tooling', - ]); - assert.doesNotMatch(JSON.stringify(form), /Desktop/); + assert.ok(product.attributes.options.includes('Desktop app')); + assert.ok(product.attributes.options.includes('CLI - ACP')); + assert.ok(product.attributes.options.includes('CLI - headless')); const ids = form.body.filter(field => field.id).map(field => field.id); assert.equal(new Set(ids).size, ids.length); } const bug = parseYaml(readFileSync(new URL('../.github/ISSUE_TEMPLATE/01-bug-report.yml', import.meta.url), 'utf8')); - assert.equal(bug.body.find(field => field.id === 'upload-id'), undefined); + assert.notEqual(bug.body.find(field => field.id === 'upload-id').validations?.required, true); for (const retired of ['bug.yml', 'feature.yml']) assert.equal(existsSync(new URL(`../.github/ISSUE_TEMPLATE/${retired}`, import.meta.url)), false); assert.equal(classifyChanges(['README_ZH.md', 'README.md']).docsOnly, true); From 3b2253e04c96a80ae57488dda73c8d9c0a5568ab Mon Sep 17 00:00:00 2001 From: saladday <1203511142@qq.com> Date: Sat, 19 Sep 2026 23:35:04 +0800 Subject: [PATCH 4/4] fix: allow policy questions without a product or platform --- .github/ISSUE_TEMPLATE/03-question.yml | 14 ++++++++------ test/source-sync.test.mjs | 5 ++++- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/03-question.yml b/.github/ISSUE_TEMPLATE/03-question.yml index 474da975d..a200f16c2 100644 --- a/.github/ISSUE_TEMPLATE/03-question.yml +++ b/.github/ISSUE_TEMPLATE/03-question.yml @@ -1,5 +1,5 @@ -name: Usage question -description: Ask about the Desktop app, CLI, or building from source. +name: Usage or repository policy question +description: Ask about the Desktop app, CLI, source builds, or contribution policy. title: "[Question]: " labels: ["question", "needs-triage"] body: @@ -7,6 +7,7 @@ body: id: product attributes: label: Product or interface + description: Leave blank if unsure or asking about repository policy. options: - Desktop app - CLI - interactive TUI @@ -14,7 +15,7 @@ body: - CLI - ACP - Source build or repository tooling validations: - required: true + required: false - type: textarea id: question attributes: @@ -25,6 +26,7 @@ body: id: platform attributes: label: Platform + description: Leave blank if unknown or not applicable. options: - macOS - Windows @@ -32,11 +34,11 @@ body: - WSL - Multiple platforms validations: - required: true + required: false - type: textarea id: context attributes: - label: Version and what you have tried - description: Include documentation you followed and relevant redacted output. Do not include keys or account data. + label: Version or policy context + description: For usage questions, include your version and what you tried. For policy questions, link the relevant policy. Do not include keys or account data. validations: required: true diff --git a/test/source-sync.test.mjs b/test/source-sync.test.mjs index 3a229f504..3b7a5f653 100644 --- a/test/source-sync.test.mjs +++ b/test/source-sync.test.mjs @@ -426,7 +426,7 @@ test('public support forms preserve destination URLs and separate Desktop from C for (const name of forms) { const form = parseYaml(readFileSync(new URL(`../.github/ISSUE_TEMPLATE/${name}`, import.meta.url), 'utf8')); const product = form.body.find(field => field.id === 'product'); - assert.equal(product.validations.required, true); + assert.equal(product.validations.required, name !== '03-question.yml'); assert.ok(product.attributes.options.includes('Desktop app')); assert.ok(product.attributes.options.includes('CLI - ACP')); assert.ok(product.attributes.options.includes('CLI - headless')); @@ -453,6 +453,9 @@ test('issue forms label incoming reports for triage and retain collaborator-only const policy = config.contact_links.find(link => link.url.endsWith('/CONTRIBUTING.md')); assert.match(policy.about, /only from repository collaborators/); assert.match(policy.about, /external PRs are not accepted/); + const question = parseYaml(readFileSync(new URL('../.github/ISSUE_TEMPLATE/03-question.yml', import.meta.url), 'utf8')); + assert.equal(question.body.find(field => field.id === 'platform').validations.required, false); + assert.equal(question.body.find(field => field.id === 'question').validations.required, true); }); test('issue notification is restricted to public destination events and builds payloads offline', t => {