aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorPastaLaPate <pastalapate@proton.me>2026-11-03 18:33:39 +0100
committerPastaLaPate <pastalapate@proton.me>2026-11-03 18:33:39 +0100
commit59af48587b9f8a99b04c618b069ec7895c2f1989 (patch)
treeea2e528804b107b6bae2bc8c2e31e8ab8e1fd8ee /.github
parentbc516b118b3ab67bb9d5966c90064f32498c41db (diff)
fixes and added workflow
Diffstat (limited to '.github')
-rw-r--r--.github/ISSUE_TEMPLATE/game_bug.yml2
-rw-r--r--.github/ISSUE_TEMPLATE/visual_bug.yml2
-rw-r--r--.github/workflows/label-issues.yml86
3 files changed, 88 insertions, 2 deletions
diff --git a/.github/ISSUE_TEMPLATE/game_bug.yml b/.github/ISSUE_TEMPLATE/game_bug.yml
index 02012ccfc2..8c3c775ea8 100644
--- a/.github/ISSUE_TEMPLATE/game_bug.yml
+++ b/.github/ISSUE_TEMPLATE/game_bug.yml
@@ -1,7 +1,7 @@
name: Gameplay Bug
description: The game doesnt works properly
title: "[GBug] "
-labels: ["bug"]
+labels: ["game-bug"]
body:
- type: checkboxes
id: checks
diff --git a/.github/ISSUE_TEMPLATE/visual_bug.yml b/.github/ISSUE_TEMPLATE/visual_bug.yml
index efe5bfaebf..15daf8f5c1 100644
--- a/.github/ISSUE_TEMPLATE/visual_bug.yml
+++ b/.github/ISSUE_TEMPLATE/visual_bug.yml
@@ -1,5 +1,5 @@
name: Visual Bug
-description: The game doesnt renders properly
+description: The game doesn't render properly
title: "[VBug] "
labels: ["visual-bug"]
body:
diff --git a/.github/workflows/label-issues.yml b/.github/workflows/label-issues.yml
new file mode 100644
index 0000000000..4f8c70ee3a
--- /dev/null
+++ b/.github/workflows/label-issues.yml
@@ -0,0 +1,86 @@
+name: Label issues from form
+on:
+ issues:
+ types: [opened]
+
+permissions:
+ issues: write
+
+jobs:
+ label:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/github-script@v7
+ with:
+ script: |
+ const body = context.payload.issue.body || "";
+
+ // Parse "### Title\n\nanswer" sections into a map
+ const sections = {};
+ body.split(/^### /m).slice(1).forEach((block) => {
+ const [title, ...rest] = block.split("\n");
+ sections[title.trim()] = rest.join("\n").trim();
+ });
+ const get = (k) => {
+ const v = sections[k];
+ return v && v !== "_No response_" ? v : null;
+ };
+
+ const gameLabels = {
+ "Mario Kart World": "Mario Kart",
+ "Donkey Kong Bananza": "DKB",
+ "Fire Emblem": "Fire Emblem",
+ "Splatoon Raiders": "Splatoon Raiders",
+ "Pokopia": "Pokopia",
+ "Hyrule Warriors": "Hyrule Warriors",
+ "Welcome Tour": "Welcome Tour",
+ };
+
+ const labels = new Set();
+
+ // Game
+ const game = get("Game");
+ if (game && gameLabels[game]) labels.add(gameLabels[game]);
+
+ // GPU vendor
+ const gpu = get("Graphics card");
+ if (gpu) {
+ if (/nvidia/i.test(gpu)) labels.add("NVIDIA");
+ else if (/amd/i.test(gpu)) labels.add("AMD");
+ else if (/intel/i.test(gpu)) labels.add("INTEL");
+ }
+
+ // OS
+ const os = get("Operating system");
+ if (os) {
+ if (/windows/i.test(os)) labels.add("windows");
+ else if (/linux/i.test(os)) labels.add("linux");
+ else if (/macos/i.test(os)) labels.add("MacOS");
+ }
+
+ // Regression
+ if (/- \[x\] This is a regression/i.test(sections["Regression"] || "")) {
+ labels.add("regression");
+ }
+ if (get("Last known working build")) labels.add("needs-bisect");
+
+ // Crash without log
+ const isCrash = (context.payload.issue.labels || []).some(
+ (l) => l.name.toLowerCase() === "crash"
+ );
+ if (isCrash && !get("Log / crash dump")) {
+ labels.add("needs-info");
+ await github.rest.issues.createComment({
+ ...context.repo,
+ issue_number: context.issue.number,
+ body: "Thanks for the report! Please attach the log / crash dump so we can investigate.",
+ });
+ }
+
+ if (labels.size) {
+ await github.rest.issues.addLabels({
+ ...context.repo,
+ issue_number: context.issue.number,
+ labels: [...labels],
+ });
+ }