chore(github): adopt grouped issue labels

Issue labels move to type/platform/area/status groups. Templates apply
the renamed type labels, the bug form gains HarmonyOS (reports such as
#308 had to pick Android), and questions are pointed at Discussions Q&A.

A workflow labels the platforms an issue mentions when it is opened.
Scanning title and body covers both form and free-form reports; on
existing issues it matched the form's platform in 46 of 55 and caught
reporters who picked the wrong dropdown entry.

Dependabot gets a fixed `dependencies` label so it no longer recreates
the ecosystem label `rust`.
This commit is contained in:
Darkatse 2026-10-10 00:27:51 -04:00
parent ee58d52fa3
commit d101b64266
5 changed files with 43 additions and 2 deletions

View file

@ -1,7 +1,7 @@
name: 问题报告 / Bug report
description: 报告可复现的 TauriTavern 故障 / Report a reproducible TauriTavern problem
title: "[Bug] "
labels: ["bug"]
labels: ["type: bug"]
body:
- type: markdown
attributes:
@ -28,6 +28,7 @@ body:
- Linux
- Android
- iOS
- HarmonyOS
validations:
required: true

4
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View file

@ -0,0 +1,4 @@
contact_links:
- name: 提问与求助 / Questions and help
url: https://github.com/Darkatse/TauriTavern/discussions/categories/q-a
about: 使用问题请在 Discussions 提问。 / Ask usage questions in Discussions.

View file

@ -1,7 +1,7 @@
name: 功能建议 / Feature request
description: 提议一项有明确使用场景的改进 / Propose an improvement grounded in a concrete use case
title: "[Feature] "
labels: ["enhancement"]
labels: ["type: feature"]
body:
- type: markdown
attributes:

View file

@ -20,3 +20,4 @@ updates:
- dependency-name: "dispatch2"
commit-message:
prefix: "chore(deps)"
labels: ["dependencies"]

View file

@ -0,0 +1,35 @@
name: Issue platform labels
on:
issues:
# Labels removed during triage must stay removed, so edits are not rescanned.
types: [opened]
permissions:
issues: write
jobs:
label:
runs-on: ubuntu-latest
steps:
- name: Label platforms mentioned in the issue
uses: actions/github-script@v9
with:
script: |
const platforms = {
Windows: /\bwin(dows|10|11)?\b/i,
macOS: /\bmac(os|book)?\b/i,
Linux: /\b(linux|ubuntu|debian|fedora|flatpak)\b/i,
Android: /\bandroid\b|安卓/i,
iOS: /\b(ios|ipados|iphone|ipad)\b/i,
HarmonyOS: /\b(harmonyos|openharmony)\b|鸿蒙/i,
};
const { number, title, body } = context.payload.issue;
const text = `${title}\n${body ?? ''}`;
const labels = Object.keys(platforms)
.filter(name => platforms[name].test(text))
.map(name => `platform: ${name}`);
if (labels.length > 0) {
await github.rest.issues.addLabels({ ...context.repo, issue_number: number, labels });
}