Skip to content

Conversation

@nahuel11500
Copy link
Contributor

No description provided.

@nahuel11500 nahuel11500 requested a review from Copilot October 10, 2025 05:39
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements chunked processing for Notion API blocks to handle Notion's 100-block limit per API call. The changes improve reliability when working with large documents by processing blocks in smaller chunks.

  • Extracted chunked processing logic into a reusable processBlocksInChunks function
  • Modified page creation methods to create pages first, then append blocks in chunks
  • Added a new method for creating pages in databases with proper parent structure
  • Included comprehensive tests for the chunked processing functionality

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
internal/notion/types.go Added DatabaseID field to Parent struct for database page creation
internal/notion/client.go Refactored block processing with chunked logic and added database page creation
internal/notion/client_test.go Added comprehensive tests for chunked block processing functionality

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@nahuel11500 nahuel11500 force-pushed the fix/block-size-creating-page branch from 48d4039 to 0c9a919 Compare October 10, 2025 05:42
@nahuel11500 nahuel11500 merged commit 64cd18a into main Oct 10, 2025
16 checks passed
@nahuel11500 nahuel11500 deleted the fix/block-size-creating-page branch October 10, 2025 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants