Skip to content

Do not append template if parameter description exists #783

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

Merged
merged 3 commits into from
Jul 22, 2025

Conversation

adityapatwardhan
Copy link
Member

PR Summary

This pull request focuses on improving the handling of parameter descriptions in the TryGetMergedParameters method and adding corresponding test coverage to ensure correctness. The changes aim to refine the logic for merging descriptions and prevent boilerplate text from being appended unnecessarily.

Improvements to parameter description handling:

  • src/Common/MergeUtils.cs: Updated the TryGetMergedParameters method to include a check for boilerplate descriptions using Constants.FillInParameterDescriptionTemplate. This ensures that parameter descriptions are not concatenated with boilerplate text unless necessary.

Test coverage enhancements:

  • test/Pester/UpdateCommandHelp.Tests.ps1: Added a test to verify that parameter descriptions are not appended with boilerplate text if the description is not boilerplate. This strengthens the validation of the updated logic in TryGetMergedParameters.

PR Context

Fixes #773

@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Collaborator

@sdwheeler sdwheeler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Collaborator

@sdwheeler sdwheeler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@adityapatwardhan adityapatwardhan merged commit 779a3b0 into main Jul 22, 2025
8 checks passed
@adityapatwardhan adityapatwardhan deleted the UpdateMDTemplateIssue branch July 22, 2025 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update-MarkdownCommandHelp is inserting placeholders and original descriptions of parameters
2 participants