mirror of
https://github.com/langgenius/dify-docs.git
synced 2026-04-12 06:07:37 +07:00
Implements full incremental translation system with commit-based change detection: ## Key Features ### 1. Incremental Change Detection (analyze workflow) - Detects synchronize events and compares with last processed commit - Queries translation PR for Last-Processed-Commit from comments - Falls back to github.event.before, then PR base - Passes is_incremental flag to sync plan ### 2. Append-Only Translation Commits (execute workflow) - Checks if translation branch exists before creating/updating - For existing branches: fetches and appends new commit - For new branches: creates initial translation commit - Embeds Last-Processed-Commit: SHA in commit message - Removes --force push to preserve history - Adds tracking comment to translation PR ### 3. Incremental Update System (update workflow) - Queries translation PR for last processed commit - Uses incremental comparison range for re-translation - Appends update commits with tracking metadata - No force-push - preserves full commit history ## Benefits - **Efficiency**: Only translates changed files (~10x API reduction) - **Traceability**: 1:1 mapping between source and translation commits - **Robustness**: Handles force-pushes gracefully via persistent tracking - **History**: Preserved translation timeline, not overwritten ## Breaking Changes None - workflows are backward compatible with existing PRs.