diff --git a/.github/workflows/user-update-branch.yml b/.github/workflows/user-update-branch.yml index 42162d42..ba38cdfd 100644 --- a/.github/workflows/user-update-branch.yml +++ b/.github/workflows/user-update-branch.yml @@ -186,33 +186,30 @@ jobs: fi } - # Handle filtered path update with modified and deleted files + # Handle filtered path update: delete removed files, then update contents if [[ -n "$FILTER" ]]; then echo "Updating specific path: $FILTER" - git checkout origin/$ORIGIN -- "$FILTER" - # Commit modified files - modified=$(git diff origin/$TARGET origin/$ORIGIN --name-only -- "$FILTER") - if [[ -n "$modified" ]]; then - echo "$modified" | xargs -r git add - git commit -m "chore(branch): update $TARGET from $ORIGIN for path $FILTER" - echo "merge_status=success" >> $GITHUB_OUTPUT - echo "Modified files detected and committed for path $FILTER." - exit 0 - fi - # Commit deleted files - deleted=$(git diff origin/$TARGET origin/$ORIGIN --name-only --diff-filter=D -- "$FILTER") + # Remove files deleted in origin + deleted=$(git diff origin/$TARGET origin/$ORIGIN --diff-filter=D --name-only -- "$FILTER") if [[ -n "$deleted" ]]; then echo "$deleted" | while read file; do echo "Removing file: $file" - git rm "$file" + git rm -f "$file" done - git commit -m "chore(branch): update $TARGET from $ORIGIN for path $FILTER (deleted files)" + fi + # Checkout new and modified files + git checkout origin/$ORIGIN -- "$FILTER" + # Stage all changes under filter + git add "$FILTER" + # Commit if there are staged changes + if git diff --cached --quiet; then + echo "merge_status=no_changes" >> $GITHUB_OUTPUT + echo "No changes to merge for path $FILTER. Branches are already in sync." + else + git commit -m "chore(branch): update $TARGET from $ORIGIN for path $FILTER" echo "merge_status=success" >> $GITHUB_OUTPUT - echo "Deleted files detected and removed for path $FILTER." - exit 0 + echo "Detected and committed changes for path $FILTER." fi - echo "merge_status=no_changes" >> $GITHUB_OUTPUT - echo "No changes to merge for path $FILTER. Branches are already in sync." exit 0 fi diff --git a/CHANGELOG.md b/CHANGELOG.md index dd725881..888b43cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed a bug in `DataProcessor` where results were being duplicated when multiple branches were grouped together to unsuccessfully prevent unnecessary API calls [#32](https://github.com/architects-toolkit/SmartHopper/issues/32) - Fixed inconsistent list format handling between `AIListEvaluate` and `AIListFilter` components. +### Fixed +- Fixes "Bug: Unmatching paths in list components return duplicated values" ([#32](https://github.com/architects-toolkit/SmartHopper/issues/32)). + ## [0.2.0-alpha] - 2025-04-06 ### Added diff --git a/SmartHopper.sln b/SmartHopper.sln index eff98013..6ff24253 100644 --- a/SmartHopper.sln +++ b/SmartHopper.sln @@ -59,6 +59,16 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {D4C6D3D5-2B3A-4B6C-8C3D-57B2D0D3C1E1} = {05A44F09-190D-434E-A91B-0ECA631110FE} + {D5C6D3D5-2B3A-4B6C-8C3D-57B2D0D3C1E5} = {05A44F09-190D-434E-A91B-0ECA631110FE} + {60732624-037C-4D6D-BC4C-588A0C25C338} = {05A44F09-190D-434E-A91B-0ECA631110FE} + {A932CFFA-0C82-4A1F-92F2-003CDE1C94AC} = {05A44F09-190D-434E-A91B-0ECA631110FE} + {B932CFFA-0C82-4A1F-92F2-003CDE1C94AD} = {05A44F09-190D-434E-A91B-0ECA631110FE} + {B932CFFA-0C82-4A1F-92F2-003CDE1C94AE} = {05A44F09-190D-434E-A91B-0ECA631110FE} + {F2063A0F-FDF2-4AD2-8C92-1E374B991752} = {05A44F09-190D-434E-A91B-0ECA631110FE} + {087FFA5E-1049-459D-9C68-1C0B8E7F9EBC} = {05A44F09-190D-434E-A91B-0ECA631110FE} + EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {0D5011CB-B808-41E4-A6FC-C01F3190649C} EndGlobalSection