diff --git a/.github/workflows/sync_docs_analyze.yml b/.github/workflows/sync_docs_analyze.yml index 30fc5e87..1bec5e70 100644 --- a/.github/workflows/sync_docs_analyze.yml +++ b/.github/workflows/sync_docs_analyze.yml @@ -94,7 +94,13 @@ jobs: else echo "🆕 New PR event - analyzing full changes" - COMPARE_BASE="$PR_BASE" + + # Use merge-base to find where branch diverged from main + # This allows stale branches to trigger automation without false "mixed content" errors + MERGE_BASE=$(git merge-base "$PR_BASE" "$PR_HEAD") + echo "Branch diverged from main at: $MERGE_BASE" + + COMPARE_BASE="$MERGE_BASE" COMPARE_HEAD="$PR_HEAD" IS_INCREMENTAL="false" fi