fix(sync): keep downstream-only files when syncing folders - #18
Merged
Conversation
Folder paths in the manifest used rsync --delete, mirroring the central repo and deleting any prompt a downstream repo had added under .github/prompts/. Drop --delete so only same-named files are overwritten and downstream-only files survive. Trade-off: central deletions no longer propagate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
資料夾同步從 mirror 改為 overlay:manifest 中結尾為
/的路徑(prompts/、instructions/)不再走rsync --delete,只覆寫與中央同名的檔案。下游 repo 自己放在.github/prompts/的專案專屬 prompt,只要檔名沒有跟中央重複就會被保留。Why
已部署的下游 repo 在
.github/prompts/放了自己專案的 prompt file,每次自動同步都會被rsync --delete整批刪掉。同步應該只負責「中央有的檔案」,不該把下游自有內容視為髒資料清掉。How
.github/workflows/sync-m2-common-ai-reusable.yml:rsync -av --delete→rsync -av,並就地註明為何刻意不加--delete。.github/sync-manifest.txt與README.md的規則說明,避免文件與實作不一致。Impact
v2.0.0。Verification
python scripts/validate.py通過(4 個 prompt file,0 警告)Validate sync workflows are parseable驗證