做了一个使用 Notion 自动管理 GitHub Star 的 repo 小工具(via GitHub Actions)

2021-10-08 10:43:14 +08:00
 emlcj
Hi,我做了一个使用 Notion 自动管理 GitHub Star 的小工具,会借助 GitHub Actions 去同步(全量或者增量) Star 到 Notion 的 database,并且可以在 Notion 上进行一些标记(比如打标签、设置批注等),大家有兴趣可以试用一下~

文档在: https://www.notion.so/lcj/ed1a50d5b57b4bca8a8ec3509c38f5ed
Showcase 在: https://www.notion.so/lcj/597ca47341074f10a8a754378f470411?v=0140b25047c84ec8bc562e6106937b75
5281 次点击
所在节点    分享创造
42 条回复
xuexiaoaoooo
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.
emlcj
2021-10-21 10:28:51 +08:00
@xuexiaoaoooo 应该是描述过大了…回头我加个 patch 做下限制

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/806349

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX