From 381baa4629f304015cfe56389c5ce38517f03414 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 14 Mar 2026 17:36:50 +0000 Subject: [PATCH 1/2] Initial plan From 8d24c9128473ad33d0e14a19573de6df683cac30 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 14 Mar 2026 17:40:33 +0000 Subject: [PATCH 2/2] fix: correct Notion property name mappings in write-notion-syslog.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 提交日期 → 接收时间 (date) - 霜砚已读 → 处理状态 (checkbox → status '待处理') - 来源 → 推送方 (rich_text) - 发送者ID → DEV编号 (rich_text → select) - Removed 发送者 property (not in DB schema) - Added statusProp() helper, replaced unused checkboxProp() Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com> --- scripts/write-notion-syslog.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/scripts/write-notion-syslog.js b/scripts/write-notion-syslog.js index c4c70af1..aca1d8ab 100644 --- a/scripts/write-notion-syslog.js +++ b/scripts/write-notion-syslog.js @@ -92,8 +92,8 @@ function dateProp(dateStr) { return { date: { start: dateStr } }; } -function checkboxProp(val) { - return { checkbox: !!val }; +function statusProp(name) { + return { status: { name: String(name) } }; } // ══════════════════════════════════════════════════════════ @@ -141,14 +141,13 @@ async function main() { // 构建 Notion 页面属性 const properties = { '标题': titleProp('飞书SYSLOG · ' + (senderName || source) + ' · ' + dateStr), - '提交日期': dateProp(dateStr), - '霜砚已读': checkboxProp(false), + '接收时间': dateProp(dateStr), + '处理状态': statusProp('待处理'), }; // 可选字段(如果 Notion 数据库有这些列) - if (source) properties['来源'] = richTextProp(source); - if (senderName) properties['发送者'] = richTextProp(senderName); - if (senderOpenId) properties['发送者ID'] = richTextProp(senderOpenId); + if (source) properties['推送方'] = richTextProp(source); + if (senderOpenId) properties['DEV编号'] = selectProp(senderOpenId); // 构建页面内容 const contentBlocks = [];