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[] = '';