Skip to content

Commit 60f27cd

Browse files
authored
Merge pull request #650 from contentstack/feature/workflow
rebase
2 parents ff12553 + a3f91dd commit 60f27cd

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

.github/workflows/repo-sync.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,10 @@ jobs:
145145
rsync -av --delete ${{ env.RSYNC_SITECORE_UPLOAD_API_SRC_EXCLUDES }} ../upload-api/src/ ./upload-api/src/
146146
rsync -av --delete ../upload-api/migration-sitecore/ ./upload-api/migration-sitecore/
147147
node remove-broken-imports.js
148-
148+
if [ -z "$(git status --porcelain)" ]; then
149+
echo "No changes to commit. Skipping push."
150+
exit 0
151+
fi
149152
git add .
150153
git commit -m "Sync changes from migration-v2 PR #${{ github.event.pull_request.number }}"
151154
git push origin sync-from-migration-v2-${{ github.event.pull_request.number }}
@@ -250,7 +253,10 @@ jobs:
250253
rsync -av --delete ${{ env.RSYNC_CONTENTFUL_UPLOAD_API_SRC_EXCLUDES }} ../upload-api/src/ ./upload-api/src/
251254
rsync -av --delete ../upload-api/migration-contentful/ ./upload-api/migration-contentful/
252255
node remove-broken-imports.js
253-
256+
if [ -z "$(git status --porcelain)" ]; then
257+
echo "No changes to commit. Skipping push."
258+
exit 0
259+
fi
254260
git add .
255261
git commit -m "Sync changes from migration-v2 PR #${{ github.event.pull_request.number }}"
256262
git push origin sync-from-migration-v2-${{ github.event.pull_request.number }}
@@ -354,7 +360,10 @@ jobs:
354360
rsync -av --delete ${{ env.RSYNC_WORDPRESS_UPLOAD_API_SRC_EXCLUDES }} ../upload-api/src/ ./upload-api/src/
355361
rsync -av --delete ../upload-api/migration-wordpress/ ./upload-api/migration-wordpress/
356362
node remove-broken-imports.js
357-
363+
if [ -z "$(git status --porcelain)" ]; then
364+
echo "No changes to commit. Skipping push."
365+
exit 0
366+
fi
358367
git add .
359368
git commit -m "Sync changes from migration-v2 PR #${{ github.event.pull_request.number }}"
360369
git push origin sync-from-migration-v2-${{ github.event.pull_request.number }}

api/src/services/contentful.service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import jsonRTE from "./contentful/jsonRTE.js";
1414
import { getAllLocales, getLogMessage } from "../utils/index.js";
1515
import customLogger from "../utils/custom-logger.utils.js";
1616

17+
1718
const {
1819
DATA,
1920
// DIR

0 commit comments

Comments
 (0)