mirror of
https://github.com/langgenius/dify-docs.git
synced 2026-03-27 13:28:32 +07:00
* fix redirect language code prefixes * fix: Allow stale branches to trigger auto-sync without false mixed-content errors Changes the PR analysis to use merge-base instead of PR base commit for comparison. This allows stale branches to trigger translation automation without being falsely flagged as "mixed content" PRs. **Problem:** - When a PR branch becomes stale (main moves forward after branch creation) - Old approach compared PR_BASE (main's current HEAD) vs PR_HEAD - This included unrelated changes from main as "part of the PR" - Caused false "mixed content" errors (e.g., PR #555) **Solution:** - Use merge-base to find where branch diverged from main - Compare MERGE_BASE vs PR_HEAD (only actual PR changes) - Ignore unrelated changes that landed on main after branch creation **Benefits:** - ✅ Better contributor experience (no manual branch updates needed) - ✅ Accurate PR categorization (no false positives) - ✅ Faster automation (no waiting for updates) - ✅ Works with concurrent PRs **Example (PR #555):** - OLD: Detected 4 files (en + cn + jp) → "mixed content" ❌ - NEW: Detected 1 file (en only) → "english" ✅ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>