贴一张 Notion 上的图片:

|  |      1greatHair      2021-10-08 11:01:01 +08:00 好东西,帮顶 | 
|      2fkue0487      2021-10-08 11:35:56 +08:00 好东西。报错了什么原因啊。 Notion: error from recover cache Error: ENOENT: no such file or directory, open '/home/runner/work/github-notion-star/github-notion-star/.cache/notion-page.json' | 
|  |      3kongkongyzt      2021-10-08 12:32:30 +08:00 好的惹 | 
|  |      5kongkongyzt      2021-10-08 12:48:12 +08:00 试了一下, 确实不错, 方便管理我的 github star ✅ | 
|      6KAAAsS      2021-10-08 14:06:28 +08:00 好评!就是管理之前的 Star 好痛苦,快将近 1000…… | 
|  |      7sd539994389      2021-10-08 14:20:22 +08:00 好东西 谢谢分享 | 
|  |      8SenLief      2021-10-08 14:23:09 +08:00 挺好的,每次碰到以后可能有用的都会 star 一下,但是后面就找不到了。 | 
|  |      9ryougifujino      2021-10-08 14:29:08 +08:00 不错 | 
|  |      10CoderTom      2021-10-08 15:50:32 +08:00 不错 | 
|      11longline      2021-10-08 16:04:23 +08:00 同二楼报错 | 
|  |      12raysmond      2021-10-08 16:58:54 +08:00 支持 | 
|  |      13emlcj OP | 
|      14xdashan      2021-10-08 17:40:41 +08:00 报错,求指点 Notion: error from recover cache Error: ENOENT: no such file or directory, open '/home/runner/work/github-notion-star/github-notion-star/.cache/notion-page.json' at Object.openSync (node:fs:585:3) at Object.readFileSync (node:fs:453:35) at Object.get (/home/runner/work/github-notion-star/github-notion-star/libs/cache.ts:18:31) at new Notion (/home/runner/work/github-notion-star/github-notion-star/libs/notion.ts:19:22) at Object.<anonymous> (/home/runner/work/github-notion-star/github-notion-star/libs/notion.ts:132:23) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Module.m._compile (/home/runner/work/github-notion-star/github-notion-star/node_modules/ts-node/src/index.ts:1225:23) at Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Object.require.extensions.<computed> [as .ts] (/home/runner/work/github-notion-star/github-notion-star/node_modules/ts-node/src/index.ts:1228:12) at Module.load (node:internal/modules/cjs/loader:981:32) { errno: -2, syscall: 'open', code: 'ENOENT', path: '/home/runner/work/github-notion-star/github-notion-star/.cache/notion-page.json' } Notion: restored from cache, count is 0 Github: Start to get all starred repos, limit is 20 Notion: Start to get all pages Github: Get all starred repos success, count is 55 /home/runner/work/github-notion-star/github-notion-star/libs/notion.ts:67 pages.forEach((page) => { ^ TypeError: Cannot read properties of undefined (reading 'plain_text') at /home/runner/work/github-notion-star/github-notion-star/libs/notion.ts:68:54 at Array.forEach (<anonymous>) at Notion.addPages (/home/runner/work/github-notion-star/github-notion-star/libs/notion.ts:67:15) at Notion.fullSyncIfNeeded (/home/runner/work/github-notion-star/github-notion-star/libs/notion.ts:55:18) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Promise.all (index 1) at fullSync (/home/runner/work/github-notion-star/github-notion-star/main.ts:6:5) Error: Process completed with exit code 1. | 
|      17kappa      2021-10-08 17:44:57 +08:00 另外 unstar 的项目好像不会被自动删除 | 
|  |      18emlcj OP | 
|  |      20d5      2021-10-08 19:32:44 +08:00 这个很酷,收藏了 🎉 | 
|  |      21yakun4566      2021-10-09 09:55:24 +08:00 你们的 github token 怎么提交到仓库里的,我一提交 token 就被自动删除了 | 
|  |      22emlcj OP @yakun4566 token 是不能放在仓库里面的,得放在项目的 `secrets` 里面。放在仓库里面会导致 token 被泄露的。 | 
|      24FrankAdler      2021-10-09 12:01:03 +08:00 好东西,已用上 | 
|  |      25dengshen      2021-10-09 17:12:11 +08:00 牛掰格拉斯~ 用上了 | 
|      26mumonitor      2021-10-09 20:19:28 +08:00 好东西,但是运行 workflow 的时候报错。 猜测是 Notion Database ID 有问题,我的页面 url 是: https://www.notion.so/Github-Notion-Star-abcb96c2414a427ea3d1f96a2a72f843 尝试了:Github-Notion-Star-abcb96c2414a427ea3d1f96a2a72f843 和 abcb96c2414a427ea3d1f96a2a72f843 都不行。。。 Notion: error from recover cache Error: ENOENT: no such file or directory, open '/home/runner/work/github-notion-star/github-notion-star/.cache/notion-page.json' at Object.openSync (node:fs:585:3) at Object.readFileSync (node:fs:453:35) at Object.get (/home/runner/work/github-notion-star/github-notion-star/libs/cache.ts:18:31) at new Notion (/home/runner/work/github-notion-star/github-notion-star/libs/notion.ts:19:22) at Object.<anonymous> (/home/runner/work/github-notion-star/github-notion-star/libs/notion.ts:132:23) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Module.m._compile (/home/runner/work/github-notion-star/github-notion-star/node_modules/ts-node/src/index.ts:1225:23) at Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Object.require.extensions.<computed> [as .ts] (/home/runner/work/github-notion-star/github-notion-star/node_modules/ts-node/src/index.ts:1228:12) at Module.load (node:internal/modules/cjs/loader:981:32) { errno: -2, syscall: 'open', code: 'ENOENT', path: '/home/runner/work/github-notion-star/github-notion-star/.cache/notion-page.json' } Notion: restored from cache, count is 0 Github: Start to get all starred repos, limit is 20 Notion: Start to get all pages Github: Get all starred repos success, count is 29 @notionhq/client warn: request fail { code: 'object_not_found', message: 'Could not find database with ID: abcb96c2-414a-427e-a3d1-f96a2a72f843.' } /home/runner/work/github-notion-star/github-notion-star/node_modules/@notionhq/client/src/errors.ts:240 return new APIResponseError({ ^ APIResponseError: Could not find database with ID: abcb96c2-414a-427e-a3d1-f96a2a72f843. at Object.buildRequestError (/home/runner/work/github-notion-star/github-notion-star/node_modules/@notionhq/client/src/errors.ts:240:12) at Client.request (/home/runner/work/github-notion-star/github-notion-star/node_modules/@notionhq/client/src/Client.ts:157:15) at processTicksAndRejections (node:internal/process/task_queues:96:5) at Notion.fullSyncIfNeeded (/home/runner/work/github-notion-star/github-notion-star/libs/notion.ts:49:54) at async Promise.all (index 1) at fullSync (/home/runner/work/github-notion-star/github-notion-star/main.ts:6:5) Error: Process completed with exit code 1. | 
|  |      27emlcj OP  1 @mumonitor 是有点问题,可以看下下面的文档,你得打开 database 单独的页面,而不是 fork 的页面 | 
|  |      29Z1106264957      2021-10-10 19:01:00 +08:00 Run npm start > [email protected] start > ts-node ./main.ts Notion: error from recover cache Error: ENOENT: no such file or directory, open '/home/runner/work/github-notion-star/github-notion-star/.cache/notion-page.json' /home/runner/work/github-notion-star/github-notion-star/main.ts:30 ENVS.forEach((env) => { at Object.openSync (node:fs:585:3) ^ AssertionError [ERR_ASSERTION]: NOTION_API_KEY must be added at /home/runner/work/github-notion-star/github-notion-star/main.ts:31:11 at Object.readFileSync (node:fs:453:35) at Array.forEach (<anonymous>) at Object.get (/home/runner/work/github-notion-star/github-notion-star/libs/cache.ts:18:31) at Object.<anonymous> (/home/runner/work/github-notion-star/github-notion-star/main.ts:30:6) at new Notion (/home/runner/work/github-notion-star/github-notion-star/libs/notion.ts:19:22) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Object.<anonymous> (/home/runner/work/github-notion-star/github-notion-star/libs/notion.ts:132:23) at Module.m._compile (/home/runner/work/github-notion-star/github-notion-star/node_modules/ts-node/src/index.ts:1225:23) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Module.m._compile (/home/runner/work/github-notion-star/github-notion-star/node_modules/ts-node/src/index.ts:1225:23) at Object.require.extensions.<computed> [as .ts] (/home/runner/work/github-notion-star/github-notion-star/node_modules/ts-node/src/index.ts:1228:12) at Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Object.require.extensions.<computed> [as .ts] (/home/runner/work/github-notion-star/github-notion-star/node_modules/ts-node/src/index.ts:1228:12) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.load (node:internal/modules/cjs/loader:981:32) { errno: -2, syscall: 'open', code: 'ENOENT', path: '/home/runner/work/github-notion-star/github-notion-star/.cache/notion-page.json' } at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12) Notion: restored from cache, count is 0 Error: Process completed with exit code 1. | 
|  |      30Z1106264957      2021-10-10 19:01:21 +08:00 请问这个是为啥啊 | 
|      31daolanfler      2021-10-11 10:09:02 +08:00 @Z1106264957   NOTION_API_KEY  在 github repo 的 secrets 设置里添加一下 | 
|      32daolanfler      2021-10-11 10:11:30 +08:00 如果有些项目被我 unstar 了,full-sync 会更新吧? | 
|  |      33emlcj OP @daolanfler 目前不会的… | 
|      34bsulike      2021-10-11 11:10:01 +08:00 试了一下,很棒 | 
|      35czfandyslash      2021-10-11 17:51:44 +08:00 感谢,马上用起来 | 
|  |      36Z1106264957      2021-10-11 21:19:13 +08:00 @daolanfler 可以问问那个 NOTION_API_KEY 应该如何获取吗,我不太清楚这个操作流程,不知道该如何创建 | 
|  |      37SingeeKing PRO 一个小建议,可以把 README / README.txt / README.md / README.rst 也拉下来作为页面的内容,便于后面搜索 | 
|  |      38luanjia      2021-10-12 21:19:39 +08:00 赞,已 star | 
|      39daolanfler      2021-10-13 14:01:29 +08:00 @Z1106264957 自己建一个 integration https://www.notion.so/my-integrations 就可以拿到了 | 
|  |      40xuexiaoaoooo      2021-10-18 13:51:47 +08:00 请求体内容过大 | 
|  |      41xuexiaoaoooo      2021-10-18 13:53:01 +08:00 请求内容过大 Notion: restored from cache, count is 0 Github: Start to get all starred repos, limit is 20 Notion: Start to get all pages Github: Get all starred repos success, count is 376 Notion: Get all pages success, count is 191 @notionhq/client warn: request fail { code: 'validation_error', message: 'body failed validation: body.properties.Description.rich_text[0].text.content.length should be ≤ `2000`, instead was `5835`.' } /home/runner/work/github-notion-star/github-notion-star/node_modules/@notionhq/client/src/errors.ts:240 return new APIResponseError({ ^ APIResponseError: body failed validation: body.properties.Description.rich_text[0].text.content.length should be ≤ `2000`, instead was `5835`. at Object.buildRequestError (/home/runner/work/github-notion-star/github-notion-star/node_modules/@notionhq/client/src/errors.ts:240:12) at Client.request (/home/runner/work/github-notion-star/github-notion-star/node_modules/@notionhq/client/src/Client.ts:157:15) at processTicksAndRejections (node:internal/process/task_queues:96:5) at Notion.insertPage (/home/runner/work/github-notion-star/github-notion-star/libs/notion.ts:77:22) at fullSync (/home/runner/work/github-notion-star/github-notion-star/main.ts:10:13) Error: Process completed with exit code 1. | 
|  |      42emlcj OP @xuexiaoaoooo 应该是描述过大了…回头我加个 patch 做下限制 |