-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deletion of a file does not trigger the sync action. #68
Comments
A problem is here in that command: repo-file-sync-action/src/git.js Line 126 in 0fc61d9
It somehow can't see deleted files. |
Hey @Leocete, Thanks for taking the time to open this issue!
The problem is It only copies files which exist in the source directory to their target destination and creates a commit if there were any changes. It thus doesn't delete any files in the target directory. As you can see here: repo-file-sync-action/src/index.js Lines 63 to 68 in 0fc61d9
The copying itself is done with fs-extra. I currently have no fix for this, so you are welcome to propose ideas on how we can implement this in an elegant way! |
One way to fix this would be to get all files for both the source and target and then figure out which files should be copied from the source to the target and which files should be deleted from the target. Right now it just merges the source directory with the target. |
I opened a PR on that issue - #69 |
🎉 This issue is resolved in version v1.9.0 🎉 You have to enable deleting files in the target manually with the To use the latest version, use the Action with the uses: BetaHuhn/repo-file-sync-action@v1 Or the uses: BetaHuhn/repo-file-sync-action@latest |
🐞 Describe the bug
Deletion of a file does not trigger the sync action.
📚 To Reproduce
💡 Expected behavior
A new PR opened with file deletion.
🖼️ Screenshots
If applicable, add screenshots to help explain your problem.
⚙️ Environment
📋 Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: