fix(dc): address code review feedback

Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-03-17 10:18:22 +00:00
parent c9d44ccb9a
commit 074bb5b58b
2 changed files with 3 additions and 5 deletions

View File

@ -115,9 +115,7 @@ async function queryNotionDatabases(token) {
const databases = []; const databases = [];
try { try {
const resp = await notionGet('/v1/search', token); // search 需要 POST此处使用已知数据库 ID 直接查询
// search 需要 POST用简单 GET 替代:查询已知数据库
// 由于 search 是 POST此处跳过使用环境变量中已知的数据库 ID
} catch { } catch {
// Notion API 不可达 // Notion API 不可达
} }
@ -198,7 +196,7 @@ function countTodayApiCalls() {
if (count > peakCount) { if (count > peakCount) {
peakCount = count; peakCount = count;
const h = parseInt(hour, 10); const h = parseInt(hour, 10);
peakHour = `${String(h).padStart(2, '0')}:00-${String(h + 1).padStart(2, '0')}:00`; peakHour = `${String(h).padStart(2, '0')}:00-${String((h + 1) % 24).padStart(2, '0')}:00`;
} }
} }

View File

@ -75,7 +75,7 @@ async function fetchTodayRuns() {
while (page <= maxPages) { while (page <= maxPages) {
try { try {
const resp = await githubGet( const resp = await githubGet(
`/repos/${OWNER}/${REPO}/actions/runs?created=>=${today}T00:00:00Z&per_page=100&page=${page}` `/repos/${OWNER}/${REPO}/actions/runs?created=%3E%3D${today}T00:00:00Z&per_page=100&page=${page}`
); );
if (resp.statusCode !== 200) { if (resp.statusCode !== 200) {