Skip to content

[PS] Migrate SelfHelp module to autorest v4 #27839

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 1 commit into from
May 27, 2025
Merged

Conversation

JoyerJin
Copy link
Contributor

@JoyerJin JoyerJin commented May 26, 2025

Description

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

@Copilot Copilot AI review requested due to automatic review settings May 26, 2025 10:18
Copy link

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR migrates the SelfHelp module to use Autorest v4, updating PowerShell documentation, UX JSON, and metadata to align with the new generator output.

  • Added JsonFilePath/JsonString and via-identity parameter sets to New-* and Invoke-* cmdlets
  • Updated interface type references to drop API‐versioned suffixes (e.g., Models.IApi20240301Preview.ITroubleshooterResourceModels.ITroubleshooterResource)
  • Revised UX JSON to remove obsolete entries, adjusted Autorest directives in README, and updated module GUID and assembly info

Reviewed Changes

Copilot reviewed 47 out of 47 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/SelfHelp/SelfHelp.Autorest/docs/*.md Updated cmdlet SYNOPSIS, SYNTAX blocks, parameter set tables, and type names
src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/troubleshooters.json Removed Invoke-AzSelfHelpContinueTroubleshooter entry
src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/solutions.json Removed Invoke-AzSelfHelpWarmSolutionUp entry
src/SelfHelp/SelfHelp.Autorest/README.md Adjusted Autorest removal directives for create/update variants
src/SelfHelp/SelfHelp.Autorest/Properties/AssemblyInfo.cs Added new assembly metadata, updated module GUID and version
Comments suppressed due to low confidence (4)

src/SelfHelp/SelfHelp.Autorest/docs/Invoke-AzSelfHelpCheckNameAvailability.md:67

  • Fix typo: change 'avilabale' to 'available'.
Checks if resource name is avilabale/unique for the scope or not

src/SelfHelp/SelfHelp.Autorest/docs/New-AzSelfHelpSimplifiedSolution.md:21

  • [nitpick] The parameter name '-SResourceName' is ambiguous; consider renaming to '-ResourceName' for consistency with other cmdlets.
New-AzSelfHelpSimplifiedSolution -Scope <String> -SResourceName <String> [-Parameter <Hashtable>]

src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/troubleshooters.json:40

  • The entire Invoke-AzSelfHelpContinueTroubleshooter block was removed; this will drop help for that cmdlet. Re-add the entry or update UX JSON accordingly.
    },

src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/solutions.json:37

  • The Invoke-AzSelfHelpWarmSolutionUp command block was removed; this will prevent help from appearing for that cmdlet. Please restore it or adjust the UX JSON.
          ]

@@ -8,21 +8,40 @@ schema: 2.0.0
# New-AzSelfHelpTroubleshooter

## SYNOPSIS
Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger.
create the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger.
Copy link
Preview

Copilot AI May 26, 2025

Choose a reason for hiding this comment

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

[nitpick] Capitalize the first word ('Create') to match standard SYNOPSIS style (imperative, Pascal casing).

Suggested change
create the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger.
Create the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger.

Copilot uses AI. Check for mistakes.

Copy link
Contributor

Choose a reason for hiding this comment

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

@JoyerJin Please accept the suggest

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I cannot, this issue of function is generated by autorest

Copy link

This PR was labeled "needs-revision" because it has unresolved review comments or CI failures.
Please resolve all open review comments and make sure all CI checks are green. Refer to our guide to troubleshoot common CI failures.

@msJinLei msJinLei merged commit 32f977d into main May 27, 2025
13 checks passed
@JoyerJin JoyerJin deleted the joyer/selfhelp-migrate-v4 branch May 28, 2025 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants