From 8fa62f72da15d282768529433527db0067ac98aa Mon Sep 17 00:00:00 2001 From: RohitKini <57343193+RohitKini@users.noreply.github.com> Date: Thu, 24 Apr 2025 20:18:10 +0530 Subject: [PATCH] Update repo-sync.yml --- .github/workflows/repo-sync.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/repo-sync.yml b/.github/workflows/repo-sync.yml index 81716e200..80c3afa7d 100644 --- a/.github/workflows/repo-sync.yml +++ b/.github/workflows/repo-sync.yml @@ -164,6 +164,10 @@ jobs: steps.file_changes.outputs.index == 'true' ) run: | + if [ -z "$(git status --porcelain)" ]; then + echo "No changes to commit. Skipping PR creation." + exit 0 + fi gh pr create --repo ${{ env.SITECORE_REPO }} \ --title "Sync changes from migration-v2 PR #${{ github.event.pull_request.number }}" \ --body "This PR syncs changes from migration-v2:\n${{ github.event.pull_request.html_url }}" \ @@ -272,6 +276,10 @@ jobs: steps.file_changes.outputs.index == 'true' ) run: | + if [ -z "$(git status --porcelain)" ]; then + echo "No changes to commit. Skipping PR creation." + exit 0 + fi gh pr create --repo ${{ env.CONTENTFUL_REPO }} \ --title "Sync changes from migration-v2 PR #${{ github.event.pull_request.number }}" \ --body "This PR syncs changes from migration-v2:\n${{ github.event.pull_request.html_url }}" \ @@ -379,6 +387,10 @@ jobs: steps.file_changes.outputs.index == 'true' ) run: | + if [ -z "$(git status --porcelain)" ]; then + echo "No changes to commit. Skipping PR creation." + exit 0 + fi gh pr create --repo ${{ env.WORDPRESS_REPO }} \ --title "Sync changes from migration-v2 PR #${{ github.event.pull_request.number }}" \ --body "This PR syncs changes from migration-v2:\n${{ github.event.pull_request.html_url }}" \