File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -164,6 +164,10 @@ jobs:
164164 steps.file_changes.outputs.index == 'true'
165165 )
166166 run : |
167+ if [ -z "$(git status --porcelain)" ]; then
168+ echo "No changes to commit. Skipping PR creation."
169+ exit 0
170+ fi
167171 gh pr create --repo ${{ env.SITECORE_REPO }} \
168172 --title "Sync changes from migration-v2 PR #${{ github.event.pull_request.number }}" \
169173 --body "This PR syncs changes from migration-v2:\n${{ github.event.pull_request.html_url }}" \
@@ -272,6 +276,10 @@ jobs:
272276 steps.file_changes.outputs.index == 'true'
273277 )
274278 run : |
279+ if [ -z "$(git status --porcelain)" ]; then
280+ echo "No changes to commit. Skipping PR creation."
281+ exit 0
282+ fi
275283 gh pr create --repo ${{ env.CONTENTFUL_REPO }} \
276284 --title "Sync changes from migration-v2 PR #${{ github.event.pull_request.number }}" \
277285 --body "This PR syncs changes from migration-v2:\n${{ github.event.pull_request.html_url }}" \
@@ -379,6 +387,10 @@ jobs:
379387 steps.file_changes.outputs.index == 'true'
380388 )
381389 run : |
390+ if [ -z "$(git status --porcelain)" ]; then
391+ echo "No changes to commit. Skipping PR creation."
392+ exit 0
393+ fi
382394 gh pr create --repo ${{ env.WORDPRESS_REPO }} \
383395 --title "Sync changes from migration-v2 PR #${{ github.event.pull_request.number }}" \
384396 --body "This PR syncs changes from migration-v2:\n${{ github.event.pull_request.html_url }}" \
You can’t perform that action at this time.
0 commit comments