-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Notion] config - ignore new pages but not updates #14144
[Notion] config - ignore new pages but not updates #14144
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
WalkthroughThe pull request introduces updates to the Notion integration, specifically modifying the version numbers in the Changes
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
components/notion/sources/updated-page/updated-page.mjs (1)
188-191
: Use ofconsole.log
for loggingConsider replacing
console.log
with the source's logging mechanism to ensure consistent and configurable logging across the application. This helps in managing logs more effectively and adheres to best practices.Apply this diff to use the source's logging method:
if (isNewPage && !this.includeNewPages) { - console.log(`Ignoring new page: ${page.id}`); + this.log(`Ignoring new page: ${page.id}`); continue; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
- components/notion/package.json (1 hunks)
- components/notion/sources/updated-page/updated-page.mjs (3 hunks)
✅ Files skipped from review due to trivial changes (1)
- components/notion/package.json
🔇 Additional comments (2)
components/notion/sources/updated-page/updated-page.mjs (2)
12-12
: Version updated appropriatelyThe version number has been incremented to
"0.1.1"
to reflect the new changes made in this update.
Line range hint
174-181
: Correct handling of new pages inpropertyValues
The logic correctly checks if a page does not exist in the
propertyValues
database and initializes its properties. It setsisNewPage
totrue
, marks that a property has changed, updatespropertyValues
, and records the changes. This ensures new pages are properly tracked.
Setting the
includeNewPages
prop tofalse
should ignore newly created pages but not updates for them after they're created.Summary by CodeRabbit
New Features
includeNewPages
setting.Bug Fixes
Version Updates