Repository navigation
Improve file handling in Update AL-Go System Files - #2273
Ole Wunschmann (OleWunschmann) wants to merge 78 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR enhances the customALGoFiles behavior during “Update AL-Go System Files”, adding support for unconditional removals (filesToRemove) and improving custom-template behavior by merging template settings directly and resolving files from the original AL-Go template where applicable.
Changes:
- Add
customALGoFiles.filesToRemovesupport end-to-end (schema, defaults, resolution logic, docs, and release notes). - Update
CheckForUpdatesto read template repo settings viaReadSettingsand merge template settings during file resolution. - Expand automated coverage (unit + e2e) for include/exclude/remove resolution and custom-template propagation.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| e2eTests/scenarios/CustomTemplate/runtest.ps1 | Extends e2e scenario to validate custom-template file include/exclude/remove propagation and workflow presence. |
| Tests/CheckForUpdates.Action.Test.ps1 | Adds unit tests for destination-folder resolution and expanded GetFilesToUpdate behaviors (including filesToRemove). |
| Actions/CheckForUpdates/CheckForUpdates.ps1 | Updates settings reading (incl. trigger) and wires template settings + filesToRemove into update/removal flow. |
| Actions/CheckForUpdates/CheckForUpdates.HelperFunctions.ps1 | Implements ResolveFilePathsInDestinationFolder and extends GetFilesToUpdate to produce include/exclude/remove lists. |
| Actions/.Modules/settings.schema.json | Extends settings schema with customALGoFiles.filesToRemove and clarifying descriptions. |
| Actions/.Modules/ReadSettings.psm1 | Adds default filesToRemove array under customALGoFiles. |
| Scenarios/settings.md | Documents customALGoFiles.filesToRemove in settings reference. |
| Scenarios/CustomizingALGoForGitHub.md | Adds conceptual docs + examples for original-template resolution and filesToRemove. |
| RELEASENOTES.md | Documents enhanced customALGoFiles behavior and new filesToRemove. |
|
Maria Zhelezova (@mazhelez) The failing PS5 tests should be fixed now. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
Actions/CheckForUpdates/CheckForUpdates.HelperFunctions.ps1:1205
- Removal destinations are not constrained to
$baseFolder. AfilesToRemoveentry with a matching template file anddestinationFolder = '..'produces adestinationFullPathoutside the repository;CheckForUpdates.ps1later converts it to a relative path and passes it toRemove-Item. Normalize every removal destination and reject paths that are not descendants of the repository root before returning this list.
$filesToRemove += @(ResolveFilePaths -sourceFolder $originalTemplateFolder -destinationFolder $baseFolder -files $filesToRemoveUnresolved -projects $projects)
}
$filesToRemove += @(ResolveFilePaths -sourceFolder $templateFolder -originalSourceFolder $originalTemplateFolder -destinationFolder $baseFolder -files $filesToRemoveUnresolved -projects $projects)
$filesToRemove += @(ResolveFilePathsInDestinationFolder -destinationFolder $baseFolder -files $filesToRemoveUnresolved -projects $projects)
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The extensive security-sensitive filesystem and cross-platform behavior warrants final human validation.
Review effort: Balanced
Findings: 2
Open (4)
Transform shared expected workflow content for Linux The corresponding original-template file is accepted with onlyTest-Path, so a symlink at that… Clear trigger when reading settings during workflow regeneration This containment result is computed in the original workspace, but updates are later written after…
There was a problem hiding this comment.
🟡 Changes recommended
Relative file symlinks can abort updates instead of being safely skipped.
4 open findings
The corresponding original-template file is accepted with onlyTest-Path, so a symlink at that… Handle relative file symlinks without aborting updates · New Clear trigger when reading settings during workflow regeneration This containment result is computed in the original workspace, but updates are later written after…
1 resolved since last review
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
|
I update the docu, releasenotes, PR description and PR title to better reflect the changes of this PR. |
Enhance file resolution and destination renaming features in AL-Go template. Introduce safety measures for updates and removals involving symlinks. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…OleWunschmann/AL-Go into enhance-customALGoFiles-feature
There was a problem hiding this comment.
🔵 Needs a closer look
Cross-platform path validation and file-removal changes need human verification, and project-path handling and dependency-depth calculation still require fixes.
2 open issues
1 resolved since last review
Review effort: Balanced



What, Why & How
Custom-template
customALGoFilessettings previously took effect in consumer repositories only after a later update. Also, files present in the original AL-Go template but absent from the custom template were not selected for propagation.This PR makes Update AL-Go System Files read the custom template’s current settings during the same run. These settings are used for file selection, workflow customization, and dependency-depth calculation, rather than taking effect only on the next update.
Include and exclude rules are now resolved against both the custom template and the original AL-Go template. For example, a custom template may not contain the Power Platform workflows available in the original template. When a PTE consumer repository enables a Power Platform solution, those workflows can now be propagated from the original template. Custom-template exclusions can likewise prevent original-template files from being propagated.
The update also:
destinationNametofilesToIncludeto copy a file under a different name.Migration note: Changing
destinationNamedoes not remove the previously propagated filename. Remove that file manually if it is no longer needed.See the updated custom template documentation and release notes.
Related to #2227.
Checklist