mirror of
https://github.com/Xe138/windmill-git-sync.git
synced 2026-04-01 17:27:23 -04:00
Fixes two critical issues: 1. Remote clone/sync was never triggered because wmill sync ran before checking if workspace was empty. Reordered flow to check/clone/sync git repo BEFORE running wmill sync. 2. Push failures were reported as success because GitPython's push() doesn't raise exceptions for rejections. Added explicit checking of push result flags (ERROR and REJECTED). Additional improvements: - When workspace has files but no .git, delete contents and clone from remote to ensure proper sync state - All three cases now properly sync with remote before Windmill overwrites New flow: 1. Check workspace state and init/clone/sync git repo 2. Run wmill sync (Windmill overwrites files) 3. Commit and push (with proper error detection) Co-Authored-By: Claude <noreply@anthropic.com>