Add --display-name override argument#644
Open
martincostello wants to merge 2 commits intomicrosoft:mainfrom
Open
Add --display-name override argument#644martincostello wants to merge 2 commits intomicrosoft:mainfrom
martincostello wants to merge 2 commits intomicrosoft:mainfrom
Conversation
Add new `--display-name` override that allows the DisplayName to be manually specified when it includes a version string.
There was a problem hiding this comment.
Pull request overview
This pull request adds a new --display-name command-line argument to the update command, allowing users to manually specify the DisplayName field when it includes version strings that need to be updated. This complements the existing --display-version functionality and addresses scenarios where package manifests contain version-specific display names.
Key Changes
- Added new
--display-nameCLI option to override DisplayName values during manifest updates - Implemented logic to update DisplayName in AppsAndFeaturesEntries, following the same pattern as DisplayVersion
- Added comprehensive test coverage with new test case and test manifest resource
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/WingetCreateCore/Models/InstallerMetadata.cs | Adds DisplayName property to store CLI argument value |
| src/WingetCreateCore/Common/PackageParser.cs | Implements logic to update DisplayName in installers' AppsAndFeaturesEntries |
| src/WingetCreateCLI/Commands/UpdateCommand.cs | Defines --display-name CLI option and propagates value to installer metadata |
| src/WingetCreateCLI/Properties/Resources.resx | Adds help text resource for the new option |
| src/WingetCreateCLI/Properties/Resources.Designer.cs | Generated code for new resource string |
| doc/update.md | Documents the new --display-name argument |
| src/WingetCreateTests/WingetCreateTests/UnitTests/UpdateCommandTests.cs | Adds UpdateDisplayName test to verify the functionality |
| src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.UpdateDisplayName.yaml | Test manifest with DisplayName field for testing |
| src/WingetCreateTests/WingetCreateTests/WingetCreateTests.csproj | Registers new test resource file for build output |
Files not reviewed (1)
- src/WingetCreateCLI/Properties/Resources.Designer.cs: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/WingetCreateTests/WingetCreateTests/WingetCreateTests.csproj
Outdated
Show resolved
Hide resolved
src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.UpdateDisplayName.yaml
Show resolved
Hide resolved
src/WingetCreateTests/WingetCreateTests/UnitTests/UpdateCommandTests.cs
Outdated
Show resolved
Hide resolved
Address Copilot code review comments.
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.
Add new
--display-nameoverride that allows the DisplayName to be manually specified when it includes a version string.For example this manifest contains the version number but the update command does not currently update the value.
With these changes it's possible to override like thus:
Microsoft Reviewers: Open in CodeFlow