🧪 refactor: address code review feedback (rename fmt, improve push error logging)

Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-03-07 13:05:50 +00:00
parent e3475f64e7
commit bcecea3912
2 changed files with 6 additions and 5 deletions

View File

@ -50,4 +50,5 @@ jobs:
git config user.email "zhuyuan@guanghulab.com" git config user.email "zhuyuan@guanghulab.com"
git add signal-log/ git add signal-log/
git diff --cached --quiet || git commit -m "🧪 连通性测试信号日志 · YM-TEST-20260307-001" git diff --cached --quiet || git commit -m "🧪 连通性测试信号日志 · YM-TEST-20260307-001"
git push || true # push 可能因分支保护或无变更而失败,不影响测试结果
git push || echo "⚠️ 信号日志推送失败(可能无变更或分支受保护)"

View File

@ -293,13 +293,13 @@ async function main() {
} }
// ── 输出汇总 ────────────────────────────────────────── // ── 输出汇总 ──────────────────────────────────────────
const fmt = (r) => r.ok ? `✅(page_id: ${r.pageId})` : `❌(${r.error})`; const formatResult = (r) => r.ok ? `✅(page_id: ${r.pageId})` : `❌(${r.error})`;
console.log('\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'); console.log('\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
console.log('✅ YM-TEST-20260307-001 连通性测试完成'); console.log('✅ YM-TEST-20260307-001 连通性测试完成');
console.log(`· 信号日志写入:${signalLogSkipped ? '⚠️ 跳过(SIGNAL_LOG_DB_ID 未配置)' : fmt(results.signalLog)}`); console.log(`· 信号日志写入:${signalLogSkipped ? '⚠️ 跳过(SIGNAL_LOG_DB_ID 未配置)' : formatResult(results.signalLog)}`);
console.log(`· 变更日志写入:${fmt(results.changeLog)}`); console.log(`· 变更日志写入:${formatResult(results.changeLog)}`);
console.log(`· SYSLOG收件箱写入:${fmt(results.syslogInbox)}`); console.log(`· SYSLOG收件箱写入:${formatResult(results.syslogInbox)}`);
console.log(`· 总结:数据桥状态 = ${bridgeStatus}`); console.log(`· 总结:数据桥状态 = ${bridgeStatus}`);
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'); console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');