diff --git a/.github/workflows/skyeye-devsync-repair.yml b/.github/workflows/skyeye-devsync-repair.yml index 3696efe5..df20e3d3 100644 --- a/.github/workflows/skyeye-devsync-repair.yml +++ b/.github/workflows/skyeye-devsync-repair.yml @@ -29,6 +29,7 @@ env: SYNC_LOG_PATH: ".github/persona-brain/dev-status-sync-log.json" YELLOW_THRESHOLD_HOURS: 14 RED_THRESHOLD_HOURS: 48 + SYNC_FRESHNESS_MINUTES: 10 jobs: check-sync-status: @@ -152,7 +153,7 @@ jobs: const d = JSON.parse(require('fs').readFileSync('$SYNC_LOG_PATH','utf8')); const syncTime = new Date(d.last_sync || '2000-01-01'); const diffMin = (Date.now() - syncTime.getTime()) / 60000; - if (d.status === 'success' && diffMin < 10) console.log('success'); + if (d.status === 'success' && diffMin < ${{ env.SYNC_FRESHNESS_MINUTES }}) console.log('success'); else console.log('stale'); } catch { console.log('error'); } ") diff --git a/scripts/sync-dev-status.js b/scripts/sync-dev-status.js index 69ee5713..42fc3f88 100644 --- a/scripts/sync-dev-status.js +++ b/scripts/sync-dev-status.js @@ -86,7 +86,8 @@ async function fetchDevStatusFromNotion() { // 解析 Notion 页面属性为 dev-status 格式(霜砚签发制格式) const team = pages.map(page => { const props = page.properties || {}; - const lastSyslog = getNotionText(props['最后SYSLOG']) || getNotionDate(props['最后SYSLOG']); + const syslogProp = props['最后SYSLOG']; + const lastSyslog = getNotionDate(syslogProp) || getNotionText(syslogProp); return { dev_id: getNotionText(props['编号']) || getNotionTitle(props['Name']) || '', name: getNotionText(props['昵称']) || getNotionTitle(props['Name']) || '', diff --git a/signal-log/diag-devsync-20260325.json b/signal-log/diag-devsync-20260325.json index 88f3d2e0..6845f0b1 100644 --- a/signal-log/diag-devsync-20260325.json +++ b/signal-log/diag-devsync-20260325.json @@ -18,7 +18,7 @@ "all_failed": true, "last_success": "从未成功", "last_failure": "2026-03-24T15:02:00Z", - "failure_root_cause": "E", + "failure_root_cause": "E (Workflow不存在/配置错误 — PR创建被拒绝)", "failure_detail": "peter-evans/create-pull-request@v7 报错:GitHub Actions is not permitted to create or approve pull requests. 仓库设置不允许 Actions 创建 PR,导致每次同步数据拉取成功但提交失败。" },