CMG-824 | Delta Migration Support for Wordpress CMS#1023
Open
chetan-contentstack wants to merge 7 commits intofeature/delta-migfrom
Open
CMG-824 | Delta Migration Support for Wordpress CMS#1023chetan-contentstack wants to merge 7 commits intofeature/delta-migfrom
chetan-contentstack wants to merge 7 commits intofeature/delta-migfrom
Conversation
…e contentMapper and WordPress services to utilize new entry extraction logic, enhance error handling in parse utilities, and adjust API routes for improved response management.
Contributor
|
@chetan-contentstack take a pull this pr does not have test cases |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds/updates WordPress migration support, including generating entry mappings from WordPress exports and improving robustness of block parsing and mapper/entry generation flows.
Changes:
- Add WordPress entry extraction (
extractEntries) and wire it into the upload-api WordPress mapper flow. - Make WordPress Gutenberg block setup/parsing more fault-tolerant (parser-only fallback + safe returns).
- Fix duplicate entry-mapper accumulation and prevent double-sending HTTP responses; update WordPress entry creation to conditionally include some fields.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| upload-api/src/routes/index.ts | Prevents sending the same response twice during XML processing. |
| upload-api/src/controllers/wordpress/index.ts | Incorporates new entry extraction into WordPress mapper generation. |
| upload-api/src/config/index.json | Updates runtime config defaults (currently includes machine-specific values). |
| upload-api/migration-wordpress/utils/parseUtil.ts | Adds safe fallbacks for core block registration and parsing. |
| upload-api/migration-wordpress/utils/parseUtil.js | Compiled counterpart of the above changes. |
| upload-api/migration-wordpress/libs/extractEntries.ts | New logic to derive entry mappings per post type and persist them. |
| upload-api/migration-wordpress/libs/extractEntries.js | Compiled counterpart of the above changes. |
| upload-api/migration-wordpress/index.ts | Exports extractEntries. |
| upload-api/migration-wordpress/index.js | Compiled counterpart of the above changes. |
| api/src/services/wordpress.service.ts | Adds conditional field inclusion logic when building entry payloads. |
| api/src/services/contentMapper.service.ts | Fixes entry-mapper update to avoid re-adding the same entries. |
Comments suppressed due to low confidence (1)
upload-api/src/controllers/wordpress/index.ts:31
- The function parameter is named
config, but inside the function a newconst config = { ... }is declared for the axios request config. This shadows the parameter and makes it easy to accidentally use the wrong value (and can break future edits). Rename the inner variable (e.g.,requestConfig/axiosConfig) to avoid shadowing, and keep the passed-inconfigavailable forextractContentTypes.
jsonfileContent.type = 'content_type';
fieldMapping?.contentTypes?.push(jsonfileContent);
});
const config = {
method: 'post',
maxBodyLength: Infinity,
url: `${process.env.NODE_BACKEND_API}/v2/mapper/createDummyData/${projectId}`,
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
added 4 commits
April 6, 2026 12:28
… update string handling and error logging for better readability and maintainability.
…contentTypeData mapping.
…roved data handling.
…n; upgrade multer in upload-api and fix migration-wordpress package name.
added 2 commits
April 6, 2026 17:49
… API standards and ensure consistency in otherCmsEntryUid formatting
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.
No description provided.