From f5d84b77903149a04a902f4969f4be2efa0b4806 Mon Sep 17 00:00:00 2001 From: Chenhe Gu Date: Fri, 28 Nov 2025 00:25:53 +0900 Subject: [PATCH] Fix/sync pr auto close (#560) * fix redirect language code prefixes * fix: don't close sync PR when original is merged Only close sync PR when original is closed without merging. When original is merged, leave sync PR open for independent review. --- .github/workflows/sync_docs_cleanup.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/sync_docs_cleanup.yml b/.github/workflows/sync_docs_cleanup.yml index 9813fab3..c83e89a1 100644 --- a/.github/workflows/sync_docs_cleanup.yml +++ b/.github/workflows/sync_docs_cleanup.yml @@ -74,11 +74,12 @@ jobs: echo "Found open sync PR #${SYNC_PR_NUMBER}" - # Comment and close sync PR + # Handle sync PR based on original PR status if [ "$PR_MERGED" = "true" ]; then - gh pr close ${SYNC_PR_NUMBER} --comment "✅ Original PR #${PR_NUMBER} was merged. You can still merge this sync PR independently if translations are ready." + # Original PR was merged - leave sync PR open for independent merging + echo "ℹ️ Original PR #${PR_NUMBER} was merged. Leaving sync PR #${SYNC_PR_NUMBER} open for independent review." else - gh pr close ${SYNC_PR_NUMBER} --comment "❌ Original PR #${PR_NUMBER} was closed. If it reopens, sync will resume automatically." + # Original PR was closed without merging - close sync PR + gh pr close ${SYNC_PR_NUMBER} --comment "❌ Original PR #${PR_NUMBER} was closed without merging. Closing this sync PR. If the original PR reopens, sync will resume automatically." + echo "✅ Closed sync PR #${SYNC_PR_NUMBER}" fi - - echo "✅ Closed sync PR #${SYNC_PR_NUMBER}"