Skip to content

Commit ea58b52

Browse files
committed
Conflict resolved
2 parents 7d61294 + 8a17491 commit ea58b52

File tree

9 files changed

+28
-10
lines changed

9 files changed

+28
-10
lines changed

.github/workflows/repo-sync.yml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ env:
1111
SITECORE_REPO: contentstack-expert-services/migration-tool-sitecore # Change this to your sitecore repo
1212
CONTENTFUL_REPO: contentstack-expert-services/migration-tool-contentful # Change this to your contentful repo
1313
WORDPRESS_REPO: contentstack-expert-services/migration-tool-wordpress # Change this to your wordpress repo
14-
RSYNC_SITECORE_API_SRC_SERVICES_EXCLUDES: "--exclude 'src/services/contentful/' --exclude 'src/services/contentful.service.ts/' --exclude 'src/services/wordpress.service.ts/'" # Include only sitecore services
15-
RSYNC_CONTENTFUL_API_SRC_SERVICES_EXCLUDES: "--exclude 'src/services/wordpress.service.ts/' --exclude 'src/services/sitecore.service.ts/'" # Include only contentful services
16-
RSYNC_WORDPRESS_API_SRC_SERVICES_EXCLUDES: "--exclude 'src/services/contentful/' --exclude 'src/services/contentful.service.ts/' --exclude 'src/services/sitecore.service.ts/'" # Include only wordpress services
17-
RSYNC_SITECORE_UPLOAD_API_SRC_EXCLUDES: "--exclude 'migration-contentful/' --exclude 'migration-wordpress/' --exclude 'controllers/wordpress/' --exclude 'models/contentful.json' --exclude 'models/wordpress.json' --exclude 'services/contentful' --exclude 'validators/aem' --exclude 'validators/contentful' --exclude 'validators/wordpress'" # Include only sitecore upload-api
18-
RSYNC_CONTENTFUL_UPLOAD_API_SRC_EXCLUDES: "--exclude 'migration-sitecore/' --exclude 'migration-wordpress/' --exclude 'controllers/sitecore/' --exclude 'models/wordpress.json' --exclude 'validators/aem' --exclude 'validators/sitecore' --exclude 'validators/wordpress'" # Include only contentful upload-api
19-
RSYNC_WORDPRESS_UPLOAD_API_SRC_EXCLUDES: "--exclude 'migration-sitecore/' --exclude 'migration-contentful/' --exclude 'controllers/sitecore/' --exclude 'models/contentful.json' --exclude 'validators/aem' --exclude 'validators/sitecore' --exclude 'validators/contentful'" # Include only wordpress upload-api
14+
RSYNC_SITECORE_API_SRC_SERVICES_EXCLUDES: "--exclude 'src/services/contentful/' --exclude 'src/services/contentful.service.ts' --exclude 'src/services/wordpress.service.ts'" # Include only sitecore services
15+
RSYNC_CONTENTFUL_API_SRC_SERVICES_EXCLUDES: "--exclude 'src/services/wordpress.service.ts' --exclude 'src/services/sitecore.service.ts'" # Include only contentful services
16+
RSYNC_WORDPRESS_API_SRC_SERVICES_EXCLUDES: "--exclude 'src/services/contentful/' --exclude 'src/services/contentful.service.ts' --exclude 'src/services/sitecore.service.ts'" # Include only wordpress services
17+
RSYNC_SITECORE_UPLOAD_API_SRC_EXCLUDES: "--exclude 'migration-contentful/' --exclude 'migration-wordpress/' --exclude 'controllers/wordpress/' --exclude 'models/contentful.json' --exclude 'models/wordpress.json' --exclude 'services/contentful/' --exclude 'validators/aem/' --exclude 'validators/contentful/' --exclude 'validators/wordpress/'" # Include only sitecore upload-api
18+
RSYNC_CONTENTFUL_UPLOAD_API_SRC_EXCLUDES: "--exclude 'migration-sitecore/' --exclude 'migration-wordpress/' --exclude 'controllers/sitecore/' --exclude 'models/wordpress.json' --exclude 'validators/aem/' --exclude 'validators/sitecore/' --exclude 'validators/wordpress/'" # Include only contentful upload-api
19+
RSYNC_WORDPRESS_UPLOAD_API_SRC_EXCLUDES: "--exclude 'migration-sitecore/' --exclude 'migration-contentful/' --exclude 'controllers/sitecore/' --exclude 'models/contentful.json' --exclude 'validators/aem/' --exclude 'validators/sitecore/' --exclude 'validators/contentful/'" # Include only wordpress upload-api
2020
jobs:
2121
sync-on-merge:
2222
runs-on: ubuntu-latest
@@ -58,6 +58,12 @@ jobs:
5858
- 'ui/**'
5959
upload-api:
6060
- 'upload-api/**'
61+
migration-sitecore:
62+
- 'upload-api/migration-sitecore/**'
63+
migration-contentful:
64+
- 'upload-api/migration-contentful/**'
65+
migration-wordpress:
66+
- 'upload-api/migration-wordpress/**'
6167
index:
6268
- 'index.js'
6369
@@ -75,16 +81,18 @@ jobs:
7581
steps.file_changes.outputs.cli == 'true' ||
7682
steps.file_changes.outputs.ui == 'true' ||
7783
steps.file_changes.outputs.upload-api == 'true' ||
84+
steps.file_changes.outputs.migration-sitecore == 'true' ||
7885
steps.file_changes.outputs.index == 'true'
7986
)
8087
run: |
8188
git clone https://x-access-token:${{ secrets.GH_PAT }}@github.com/${{ env.SITECORE_REPO }}.git
8289
cd migration-tool-sitecore
8390
git checkout -b sync-from-migration-v2-${{ github.event.pull_request.number }}
84-
rsync -av --delete ${{ env.RSYNC_WORDPRESS_API_SRC_SERVICES_EXCLUDES }} ../api/ ./api/
91+
rsync -av --delete ${{ env.RSYNC_SITECORE_API_SRC_SERVICES_EXCLUDES }} ../api/ ./api/
8592
rsync -av --delete ../cli/ ./cli/
8693
rsync -av --delete ../ui/ ./ui/
8794
rsync -av --delete ${{ env.RSYNC_SITECORE_UPLOAD_API_SRC_EXCLUDES }} ../upload-api/ ./upload-api/
95+
rsync -av --delete ../upload-api/migration-sitecore ./upload-api/migration-sitecore
8896
git add .
8997
git commit -m "Sync changes from migration-v2 PR #${{ github.event.pull_request.number }}"
9098
git push origin sync-from-migration-v2-${{ github.event.pull_request.number }}
@@ -97,6 +105,7 @@ jobs:
97105
steps.file_changes.outputs.cli == 'true' ||
98106
steps.file_changes.outputs.ui == 'true' ||
99107
steps.file_changes.outputs.upload-api == 'true' ||
108+
steps.file_changes.outputs.migration-sitecore == 'true' ||
100109
steps.file_changes.outputs.index == 'true'
101110
)
102111
run: |
@@ -116,6 +125,7 @@ jobs:
116125
steps.file_changes.outputs.cli == 'true' ||
117126
steps.file_changes.outputs.ui == 'true' ||
118127
steps.file_changes.outputs.upload-api == 'true' ||
128+
steps.file_changes.outputs.migration-contentful == 'true' ||
119129
steps.file_changes.outputs.index == 'true'
120130
)
121131
run: |
@@ -126,6 +136,7 @@ jobs:
126136
rsync -av --delete ../cli/ ./cli/
127137
rsync -av --delete ../ui/ ./ui/
128138
rsync -av --delete ${{ env.RSYNC_CONTENTFUL_UPLOAD_API_SRC_EXCLUDES }} ../upload-api/ ./upload-api/
139+
rsync -av --delete ../upload-api/migration-contentful ./upload-api/migration-contentful
129140
git add .
130141
git commit -m "Sync changes from migration-v2 PR #${{ github.event.pull_request.number }}"
131142
git push origin sync-from-migration-v2-${{ github.event.pull_request.number }}
@@ -138,6 +149,7 @@ jobs:
138149
steps.file_changes.outputs.cli == 'true' ||
139150
steps.file_changes.outputs.ui == 'true' ||
140151
steps.file_changes.outputs.upload-api == 'true' ||
152+
steps.file_changes.outputs.migration-contentful == 'true' ||
141153
steps.file_changes.outputs.index == 'true'
142154
)
143155
run: |
@@ -157,6 +169,7 @@ jobs:
157169
steps.file_changes.outputs.cli == 'true' ||
158170
steps.file_changes.outputs.ui == 'true' ||
159171
steps.file_changes.outputs.upload-api == 'true' ||
172+
steps.file_changes.outputs.migration-wordpress == 'true' ||
160173
steps.file_changes.outputs.index == 'true'
161174
)
162175
run: |
@@ -167,6 +180,7 @@ jobs:
167180
rsync -av --delete ../cli/ ./cli/
168181
rsync -av --delete ../ui/ ./ui/
169182
rsync -av --delete ${{ env.RSYNC_WORDPRESS_UPLOAD_API_SRC_EXCLUDES }} ../upload-api/ ./upload-api/
183+
rsync -av --delete ../upload-api/migration-wordpress ./upload-api/migration-wordpress
170184
git add .
171185
git commit -m "Sync changes from migration-v2 PR #${{ github.event.pull_request.number }}"
172186
git push origin sync-from-migration-v2-${{ github.event.pull_request.number }}
@@ -179,6 +193,7 @@ jobs:
179193
steps.file_changes.outputs.cli == 'true' ||
180194
steps.file_changes.outputs.ui == 'true' ||
181195
steps.file_changes.outputs.upload-api == 'true' ||
196+
steps.file_changes.outputs.migration-wordpress == 'true' ||
182197
steps.file_changes.outputs.index == 'true'
183198
)
184199
run: |

api/src/services/contentful.service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ const processField = (
331331
break;
332332
}
333333
}
334+
334335
};
335336

336337
// Helper function to clean up brackets in non-numeric lang_value

api/src/services/contentful/jsonRTE.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ function parseBlockAsset(obj: any, lang?: LangType, destination_stack_id?: Stack
314314
};
315315
}
316316

317+
317318
function parseBlockquote(obj: any): any {
318319
const children = obj.content.map((e: any) => parsers.get(e.nodeType)?.(e)).filter(Boolean);
319320
return {

api/src/services/sitecore.service.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { orgService } from './org.service.js';
99
import { getLogMessage } from '../utils/index.js';
1010
import customLogger from '../utils/custom-logger.utils.js';
1111

12-
1312
const append = "a";
1413

1514
const baseDirName = MIGRATION_DATA_CONFIG.DATA

api/src/services/wordpress.service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const { JSDOM } = jsdom;
1515
const virtualConsole = new jsdom.VirtualConsole();
1616
// Get the current file's path
1717
const __filename = fileURLToPath(import.meta.url);
18+
1819
// Get the current directory
1920
const __dirname = path.dirname(__filename);
2021

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const envContents = {
3333
'Upload-API': uploadAPIEnvContent,
3434
};
3535

36+
3637
// Function to create env files
3738
const createEnvFiles = () => {
3839
// Loop through each key in the envFilePaths object

upload-api/migration-sitecore/constants/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ const MIGRATION_DATA_CONFIG = {
4242

4343
EXPORT_INFO_FILE: "export-info.json"
4444
}
45+
4546
module.exports = {
4647
MIGRATION_DATA_CONFIG
4748
};

upload-api/migration-wordpress/config/index.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@
4747
"fileName": "en-us.json",
4848
"masterfile": "posts.json"
4949

50-
51-
5250
}
5351
}
5452
}

upload-api/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
4545
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
4646

47+
4748
/* JavaScript Support */
4849
"allowJs": true /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */,
4950
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */

0 commit comments

Comments
 (0)