KEMBAR78
Ensure all the metadata is added to CommandHelp by adityapatwardhan · Pull Request #784 · PowerShell/platyPS · GitHub
Skip to content

Conversation

@adityapatwardhan
Copy link
Member

PR Summary

This pull request introduces enhancements to how metadata is extracted and processed for CommandHelp objects in the MarkdownReader and Transform modules. These changes improve the handling of optional metadata fields and ensure better compatibility with external help files and schema versions.

Enhancements to metadata handling:

  • src/MarkdownReader/CommandHelpMarkdownReader.cs: Added support for extracting additional metadata fields (ExternalHelpFile, SchemaVersion, OnlineVersionUrl, and ModuleGuid) from the parsed markdown content. These fields are now assigned to the CommandHelp object, with appropriate default values for missing entries. ([src/MarkdownReader/CommandHelpMarkdownReader.csR227-R233](https://github.com/PowerShell/platyPS/pull/784/files#diff-2b2e6a603c33dbdccc6d0bb591d4d3dd530c741130ac94757d7b754744853476R227-R233))

  • src/Transform/TransformBase.cs: Enhanced the ConvertCmdletInfo method to include SchemaVersion and improve the logic for assigning OnlineVersionUrl. The method now prioritizes the HelpUri metadata field when the Settings.OnlineVersionUrl is not provided. ([src/Transform/TransformBase.csL57-R61](https://github.com/PowerShell/platyPS/pull/784/files#diff-0dbc578bebc8903843082ecba5daf89936c0af78f376c14f7e2b068ae11996f0L57-R61))

PR Context

@adityapatwardhan adityapatwardhan changed the title WIP: Ensure all the metadata is added to CommandHelp Ensure all the metadata is added to CommandHelp Jul 23, 2025
@adityapatwardhan
Copy link
Member Author

/azp run

@azure-pipelines
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

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan adityapatwardhan merged commit bbb27c9 into main Jul 23, 2025
8 checks passed
@adityapatwardhan adityapatwardhan deleted the FixMetadata branch July 23, 2025 23:22
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.

2 participants