Refactor YamlCreate.ps1 to eliminate duplicated installer processing logic#202
Draft
Refactor YamlCreate.ps1 to eliminate duplicated installer processing logic#202
Conversation
Co-authored-by: Trenly <12611259+Trenly@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Refactor YamlCreate.ps1 to reduce duplicated logic in Auto mode
Refactor YamlCreate.ps1 to eliminate duplicated installer processing logic
Jan 2, 2026
Owner
|
@mdanish-kh - Mind reviewing? |
Owner
|
@copilot - Update the new function so that if |
…amilyName Co-authored-by: Trenly <12611259+Trenly@users.noreply.github.com>
Author
Updated in commit 8af9363. The |
mdanish-kh
approved these changes
Jan 3, 2026
Collaborator
mdanish-kh
left a comment
There was a problem hiding this comment.
Tested the normal and auto flow journey, most of the code is nearly identical anyway ![]()
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.
The Auto mode and QuickUpdateVersion mode contained ~50 lines of identical installer processing logic (downloading, SHA256 calculation, type detection, metadata extraction).
Changes
Update-InstallerEntryhelper functionRead-QuickInstallerEntryto call helper with-ShowProgressflag for user feedback-Preserveflag to prevent removal of ProductCode, SignatureSha256, and PackageFamilyName when new values cannot be extractedExample
Before (duplicated in two locations):
After:
The new function respects the
-Preserveflag: when specified, ProductCode, SignatureSha256, and PackageFamilyName are preserved even if new values cannot be extracted, matching the behavior used elsewhere in the script for fields like ReleaseNotes and ReleaseDate.Net: -20 lines, zero duplication, one bug fixed.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.