From f79ead0e7188ee5bb984ee208573086f3792caa5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 9 Mar 2026 09:16:58 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=A3=E7=A0=81=E5=AE=A1?= =?UTF-8?q?=E6=9F=A5=E5=8F=8D=E9=A6=88=EF=BC=9A=E4=BD=BF=E7=94=A8=20Intl.D?= =?UTF-8?q?ateTimeFormat=E3=80=81=E6=8F=90=E5=8F=96=E5=B8=B8=E9=87=8F?= =?UTF-8?q?=E3=80=81=E6=94=B9=E8=BF=9B=E9=94=99=E8=AF=AF=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com> --- README.md | 2 +- scripts/update-readme-bulletin.js | 24 ++++++++++++++++-------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 24c2ae30..8d097b4d 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,7 @@ | 时间 | 事件 | 详情 | |------|------|------| +| 03-09 17:15 | 📦 铸渊 (Copilot) | 模块更新: `scripts/` | | 03-09 17:01 | 📦 铸渊 (ZhùYuān) | 模块更新: `backend-integration/` | | 03-09 17:01 | 📦 铸渊 (ZhùYuān) | 模块更新: `backend/` | | 03-09 17:01 | 📦 铸渊 (ZhùYuān) | 模块更新: `cloud-drive/` | @@ -80,7 +81,6 @@ | 03-09 17:01 | 📦 铸渊 (ZhùYuān) | 模块更新: `m15-cloud-drive/` | | 03-09 17:01 | 📦 铸渊 (ZhùYuān) | 模块更新: `m18-health-check/` | | 03-09 17:01 | 📦 铸渊 (ZhùYuān) | 模块更新: `notification/` | -| 03-09 17:01 | 📦 铸渊 (ZhùYuān) | 模块更新: `scripts/` | | 03-09 17:01 | 📦 铸渊 (ZhùYuān) | 模块更新: `status-board/` | | 03-09 17:01 | 📦 铸渊 (ZhùYuān) | 模块更新: `ticket-system/` | diff --git a/scripts/update-readme-bulletin.js b/scripts/update-readme-bulletin.js index 27469103..f9524729 100644 --- a/scripts/update-readme-bulletin.js +++ b/scripts/update-readme-bulletin.js @@ -20,6 +20,7 @@ const MEMORY_PATH = path.join(__dirname, '..', '.github', 'brain', 'memory.json' const BULLETIN_START = ''; const BULLETIN_END = ''; const MAX_ENTRIES = 20; +const MAX_GIT_LOG_COMMITS = 30; /* ── 开发者名册 ─────────────────────────── */ const DEV_MAP = { @@ -54,12 +55,17 @@ function formatTime(ts) { if (!ts) return '—'; const d = new Date(ts); if (isNaN(d.getTime())) return ts; - const bj = new Date(d.getTime() + 8 * 3600000); - const mm = String(bj.getUTCMonth() + 1).padStart(2, '0'); - const dd = String(bj.getUTCDate()).padStart(2, '0'); - const hh = String(bj.getUTCHours()).padStart(2, '0'); - const mi = String(bj.getUTCMinutes()).padStart(2, '0'); - return `${mm}-${dd} ${hh}:${mi}`; + const fmt = new Intl.DateTimeFormat('zh-CN', { + timeZone: 'Asia/Shanghai', + month: '2-digit', + day: '2-digit', + hour: '2-digit', + minute: '2-digit', + hour12: false, + }); + const parts = fmt.formatToParts(d); + const get = (type) => (parts.find(p => p.type === type) || {}).value || ''; + return `${get('month')}-${get('day')} ${get('hour')}:${get('minute')}`; } function statusIcon(result) { @@ -177,7 +183,7 @@ function detectRecentModulePushes() { try { const log = execSync( - 'git log --oneline --name-only --since="7 days ago" -30 2>/dev/null || true', + `git log --oneline --name-only --since="7 days ago" -${MAX_GIT_LOG_COMMITS} 2>/dev/null || true`, { encoding: 'utf8', cwd: path.join(__dirname, '..') } ); @@ -219,7 +225,9 @@ function detectRecentModulePushes() { detail: `模块更新: \`${mod}/\``, sortKey: new Date(ts).getTime(), }); - } catch (_) { /* skip */ } + } catch (err) { + console.log(`⚠️ 读取模块 ${mod} 提交信息失败: ${err.message}`); + } } } catch (err) { console.log(`⚠️ Git 日志读取失败: ${err.message}`);