Skip to content

refactor: enhance block name resolution and schema mapping for WordPr…#1033

Merged
umeshmore45 merged 4 commits intodevfrom
feature/cmg-705
Apr 8, 2026
Merged

refactor: enhance block name resolution and schema mapping for WordPr…#1033
umeshmore45 merged 4 commits intodevfrom
feature/cmg-705

Conversation

@AishDani
Copy link
Copy Markdown
Contributor

@AishDani AishDani commented Apr 8, 2026

…ess integration

@AishDani AishDani requested a review from a team as a code owner April 8, 2026 09:06
Copy link
Copy Markdown
Contributor

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 refactors WordPress block name resolution to better handle core/missing blocks (using originalName) and extends schema/value mapping to support additional block types (notably Jetpack Markdown) during WordPress migration ingestion.

Changes:

  • Updated block-name resolution to prefer metadata.name, then originalName for core/missing, and normalize media blocks to media.
  • Added dedicated schema mapping for core/missing (including a markdown field type for jetpack/markdown) and adjusted schema assembly for certain blocks (e.g., core/search).
  • Updated WordPress service-side schema matching to consider both otherCmsField and otherCmsType, and added formatting support for markdown.

Reviewed changes

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

File Description
upload-api/migration-wordpress/libs/schemaMapper.ts Refines block-name resolution and introduces/adjusts schema mapping for core/missing and core/search.
upload-api/migration-wordpress/libs/extractItems.ts Improves core/missing resolution and structure comparison by incorporating originalName.
api/src/services/wordpress.service.ts Adds shared block-name resolver, broadens matching rules, removes reliance on metadata.name alone, and adds markdown formatting support.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@umeshmore45 umeshmore45 merged commit 55c2530 into dev Apr 8, 2026
9 checks passed
@umeshmore45 umeshmore45 deleted the feature/cmg-705 branch April 8, 2026 12:26
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.

5 participants