Conversation
Improves property conversion methods in Notion classes to support both hashtables and custom objects, ensuring better input validation and dynamic property extraction. Enhances constructors for flexibility, updating rich text handling and parameter ordering for consistency. Streamlines API function logic by reducing redundancy, unifying formatting practices, and centralizing object creation. Updates documentation and adheres to PowerShell conventions for clarity and maintainability. Co-authored-by: Fabian Franz Steiner <fasteiner@users.noreply.github.com>
Fixes #75 Co-authored-by: Fabian Franz Steiner <fasteiner@users.noreply.github.com>
Fixes #75 Enhance Unit Tests for Notion Database Properties and Add New Tests for Select and Status Classes - Added type verification for title and URL database properties in their respective tests. - Refactored unique_id database property tests to improve structure and clarity, including constructor and property tests. - Introduced new tests for the notion_select class, covering various constructors and object conversion. - Added tests for the notion_status class, validating constructors and conversion from PSCustomObject. - Updated copilot instructions for better clarity and guidance on project structure and testing practices. Co-authored-by: Fabian Franz Steiner <fasteiner@users.noreply.github.com>
Fixes #75 Changelog updated Co-authored-by: Fabian Franz Steiner <fasteiner@users.noreply.github.com>
tsubotitsch
approved these changes
Aug 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
Added
.github/copilot-instructions.md) describing project structure, coding/testing conventions, and module-specific practices.Remove-DefaultPropertyNamesfor filtering default .NET properties during conversions.Add-NotionDatabaseToParentfor simplified database creation.notion_pageproperties::ConvertFromObjectto support hashtables and custom objects.notion_databaseproperties::ConvertFromObjectwith validation and dynamic property extraction.zz1_Type_Accelerator.ps1), covering all database and page property classes, removing internal structures, and improving maintainability.New-NotionDatabase.Tests.ps1validating function behavior.notion_database.Class.Tests.ps1covering constructors, conversions, and edge cases.Changed
DatabasePropertiesBaseand specific property structures (e.g., formula, multi_select, number, relation, select, status, unique_id).notion_databaseconstructor parameter ordering and conversion logic.Createfactory method tonotion_rollup.notion_selectandnotion_statusto improve defaults and usability.Add-NotionPageToDatabase.ps1for formatting and parameter consistency.New-NotionDatabase.ps1: Simplifiedtitleconversion usingrich_text::ConvertFromObjects, refactored to directly returnnotion_databaseobject, and clarified documentation.Invoke-NotionApiCall.ps1: Unified casing forparam/process, standardized string formatting (-f), and streamlined spacing/flow.Fixed
notion_databaseconstructor now correctly handles all parameter types, including rich text titles.Write-Errorusage in relation property classes (-Category InvalidData, corrected error messages).