Play your own Switch games on iPhone/iPad — one-click macOS app, no terminal. | 把 Switch 游戏装进 iPhone:图形界面一键构建,不用命令行。Bring your own game.
Swift apple-siliconcustom-formathomebrewiosipaipadipadosiphonemetalnative-portnintendo-switchnxnativeromfsswitch-games
Issue triage: the model comes from the TRIAGE_MODEL variable, validated and passed as one argument
v0lumehi817e6bb5efcc
diff --git a/.github/triage/README.md b/.github/triage/README.mdindex dcc04e00..d86b48d1 100644--- a/.github/triage/README.md+++ b/.github/triage/README.md@@ -1,8 +1,9 @@# Issue triage-`.github/workflows/issue-triage.yml` labels a new issue, asks for what the form requires and is missing, links likely duplicates and matches `[RED]` log lines against `docs/agents/symptoms.md`. It uses the GitHub Copilot CLI, so it runs on a Copilot subscription (about one premium request per issue).+`.github/workflows/issue-triage.yml` labels a new issue, asks for what the form requires and is missing, links likely duplicates and matches `[RED]` log lines against `docs/agents/symptoms.md`. It uses the GitHub Copilot CLI, so it runs on a Copilot subscription .-- **Setup:** add the Actions secret `COPILOT_TOKEN`: a fine-grained personal access token with only the account permission "Copilot Requests", from an account with Copilot. Without it the workflow skips with a notice. An optional repository variable `TRIAGE_MODEL` picks the model.+- **Setup:** add the Actions secret `COPILOT_TOKEN`: a fine-grained personal access token with only the account permission "Copilot Requests", from an account with Copilot. Without it the workflow skips with a notice.+- **Model:** set the repository variable `TRIAGE_MODEL` (Settings > Secrets and variables > Actions > Variables) to a model id the CLI accepts; it is passed as `--model`. Unset, the CLI uses GitHub's default. Recommended for triage: `claude-haiku-4.5`, a small fast model that is plenty for labels and a short comment. Models are billed differently: Copilot Pro on a monthly plan uses usage-based billing since 1 June 2026 (Haiku 4.5 is $1 per million input and $5 per million output tokens, [models and pricing](https://docs.github.com/en/copilot/reference/copilot-billing/models-and-pricing)), and an annual plan that stayed on request-based billing counts a premium-request multiplier per model (Haiku 4.5 is 0.33; no model in that table counts 0, [multipliers](https://docs.github.com/en/copilot/reference/copilot-billing/model-multipliers-for-annual-plans)). One triage is a prompt of a few thousand tokens and a few hundred tokens back.- **Labels it uses:** `game`, `build`, `launcher`, `ios`, `mac`, `idea`, `question`, `needs-info`, `duplicate`. It only adds those that exist; it never creates one. `no-triage` on an issue skips it.- **Re-run:** Actions > issue-triage > Run workflow with the issue number. The earlier triage comment is updated.- **Security:** `gather` (read-only, no secrets) writes the data; `analyze` (no permissions, the model token) can only read in an empty directory; `apply` (`issues: write`, no model token) accepts only JSON of the fixed shape: labels from the list, at most one comment with no @-mention, HTML or link except github.com/LNPANDY/NX2Apple and github.com/seedds/nxnative, duplicates that are real candidates. It never closes or edits an issue.diff --git a/.github/workflows/issue-triage.yml b/.github/workflows/issue-triage.ymlindex 37c048f2..0cd59064 100644--- a/.github/workflows/issue-triage.yml+++ b/.github/workflows/issue-triage.yml@@ -1,4 +1,4 @@-# Issue triage and log first aid, run by the GitHub Copilot CLI on a Copilot subscription (about one premium request per issue).+# Issue triage and log first aid, run by the GitHub Copilot CLI on a Copilot subscription (see .github/triage/README.md for the cost).## Three jobs, each with the least it needs; the issue text is untrusted, so the model never holds a write token:# gather issues: read, no secrets reads the issue, extracts log signals, matches docs/agents/symptoms.md, finds duplicate candidates@@ -97,14 +97,19 @@ jobs:if: steps.secret.outputs.set == 'true'env:COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_TOKEN }}- COPILOT_MODEL: ${{ vars.TRIAGE_MODEL }} # optional repository variable; empty keeps the CLI's default+ TRIAGE_MODEL: ${{ vars.TRIAGE_MODEL }} # optional repository variable (a model id, e.g. claude-haiku-4.5); unset keeps GitHub's defaultrun: |# An empty directory holds nothing to read. The model can only call `view`; shell, file writes and URLs are denied# (deny rules win over --allow-all-tools, which prompt mode needs), no MCP servers, no repository instructions.mkdir -p "$RUNNER_TEMP/empty"cd "$RUNNER_TEMP/empty"- [ -n "$COPILOT_MODEL" ] || unset COPILOT_MODEL- timeout 300 copilot -p "$(cat "$RUNNER_TEMP/triage/prompt.txt")" --silent --no-ask-user --no-custom-instructions \+ model=()+ if [ -n "$TRIAGE_MODEL" ]; then+ [[ "$TRIAGE_MODEL" =~ ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$ ]] || { echo "::error::TRIAGE_MODEL is not a model id"; exit 1; }+ model=(--model "$TRIAGE_MODEL") # one argument, never part of a shell string+ echo "model: $TRIAGE_MODEL"+ fi+ timeout 300 copilot "${model[@]}" -p "$(cat "$RUNNER_TEMP/triage/prompt.txt")" --silent --no-ask-user --no-custom-instructions \--no-auto-update --disable-builtin-mcps --disable-client-telemetry \--available-tools=view --allow-all-tools --deny-tool=shell --deny-tool=write --deny-tool=url \--secret-env-vars=COPILOT_GITHUB_TOKEN > "$RUNNER_TEMP/triage/result.txt"