From d60c45c1ab89772676572c64500f998d2f312903 Mon Sep 17 00:00:00 2001 From: ypsdf1 Date: Thu, 26 Nov 2026 10:08:16 +0800 Subject: [PATCH] =?UTF-8?q?15m44z=20=E7=BB=AD:=20=E5=8C=BF=E5=90=8D?= =?UTF-8?q?=E5=B7=A5=E5=8D=95=20issue=20=E6=AD=A3=E6=96=87=E4=B8=8D?= =?UTF-8?q?=E5=86=99=E6=8F=90=E5=8D=95=E4=BA=BA=E5=90=8D=E5=AD=97(?= =?UTF-8?q?=E9=98=B2=E5=81=87=E5=8C=BF=E5=90=8D)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 用户指出: GitHub issue 是公开的, 匿名工单 body 写「玩家:steve」等于假匿名。 修: ghSyncCreate 按 token 前缀判 — bot(ghs_)建的匿名单 → body 只放工单正文+附件, 不写提单人名字(提单人只记 PHP 后台 web_tickets.requester, 仅管理员可见, 入库 645/661 行 requester=:player 不随匿名改, 管理员始终能看到真实提单人); 实名单(gho_/ghp_)→ 保留「玩家:xxx」(提单人是本人, 公开无妨)。 gh_api.php 部署 MATCH。 --- gh_api.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gh_api.php b/gh_api.php index 25d6de6..623feeb 100644 --- a/gh_api.php +++ b/gh_api.php @@ -260,7 +260,17 @@ function ghSyncCreate($ticketId, $player, $title, $description, $images = [], $t . ' desc_len=' . mb_strlen($desc) . ' desc_head=' . mb_substr($desc, 0, 80) . ' imgs=' . json_encode($images, JSON_UNESCAPED_UNICODE)); - $bodyParts = ['玩家:`' . $player . '`', '']; + // ★ 15m44z 第三部分:匿名工单 issue 正文【不写提单人名字】。 + // GitHub issue 是公开的,body 写「玩家:steve」等于假匿名。判定:token 是 + // appbot installation token(ghs_ 前缀)→ 匿名工单 → body 只放工单正文+附件,不提单人信息 + // (提单人名字只记 PHP 后台 web_tickets.requester,仅管理员可见);实名工单(token gho_/ghp_) + // → 保留「玩家:xxx」(提单人是本人,公开无妨)。 + $isAnonIssue = (strpos((string)$token, 'ghs_') === 0); + if ($isAnonIssue) { + $bodyParts = []; + } else { + $bodyParts = ['玩家:`' . $player . '`', '']; + } if ($desc !== '') $bodyParts[] = $desc; if (is_array($images) && count($images) > 0) { $bodyParts[] = '';