Files
dify-docs/.github
Chenhe Gu 7c11027d80 Fix/allow stale branch auto sync (#556)
* 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>
2025-11-27 04:36:24 -08:00
..
2025-08-15 11:17:38 +08:00