diff --git a/.github/workflows/zhuyuan-daily-inspection.yml b/.github/workflows/zhuyuan-daily-inspection.yml index a1114c0d..404db1e2 100644 --- a/.github/workflows/zhuyuan-daily-inspection.yml +++ b/.github/workflows/zhuyuan-daily-inspection.yml @@ -17,6 +17,7 @@ jobs: run: node scripts/zhuyuan-inspection.js - name: 推送工单到Notion env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NOTION_TOKEN_BINGSUO: ${{ secrets.NOTION_TOKEN_BINGSUO }} NOTION_TOKEN_ZHIZHI: ${{ secrets.NOTION_TOKEN_ZHIZHI }} WORKORDER_DB_BINGSUO: ${{ secrets.WORKORDER_DB_BINGSUO }} diff --git a/scripts/agent-checkin.js b/scripts/agent-checkin.js index 56e49e76..6509b50f 100644 --- a/scripts/agent-checkin.js +++ b/scripts/agent-checkin.js @@ -68,7 +68,7 @@ function githubApi(urlPath) { // ── 获取 workflow 今日最新 run ──────────────────────────────────────────── async function getLatestRun(workflowFile) { - const urlPath = `/repos/${REPO}/actions/workflows/${encodeURIComponent(workflowFile)}/runs?per_page=1&created=>=${today}`; + const urlPath = `/repos/${REPO}/actions/workflows/${encodeURIComponent(workflowFile)}/runs?per_page=1&created=${encodeURIComponent('>=' + today)}`; const data = await githubApi(urlPath); if (!data || !data.workflow_runs || data.workflow_runs.length === 0) { return null;