Skip to content

Commit

Permalink
fix body.properties.Description too long
Browse files Browse the repository at this point in the history
  • Loading branch information
Panmax committed Apr 5, 2022
1 parent 6e9f36d commit a8874e9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libs/notion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ export class Notion {
}

async insertPage(repo: Repo) {
if (repo.description && repo.description.length >= 2000) {
repo.description = repo.description.substr(0, 120) + '...'
}
const data = await this.notion.pages.create({
parent: {
database_id: databaseId,
Expand Down

0 comments on commit a8874e9

Please sign in to comment.