Skip to content

[Do not merge!] Yanxu/for test #28149

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

Closed
wants to merge 8 commits into from
Closed

[Do not merge!] Yanxu/for test #28149

wants to merge 8 commits into from

Conversation

YanaXu
Copy link
Contributor

@YanaXu YanaXu commented Jul 8, 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 July 8, 2025 05:56
Copy link

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

Copy link

github-actions bot commented Jul 8, 2025

‼️ DO NOT MERGE THIS PR ‼️
This PR was labeled "Do Not Merge" because it contains code change that cannot be merged. Please contact the reviewer for more information.

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 adds temporary debug logging to the TestAutorest workflow, fixes several spelling mistakes in help markdown files, and updates module scaffolding, including ChangeLog entries and newly generated Authorization.Autorest artifacts.

  • Inserted Write-Host debug messages around the TestAutorest block in ExecuteCIStep.ps1
  • Corrected typos in multiple help .md files (Management, eligible, resourceType)
  • Updated ChangeLog.md with breaking-change announcements and scaffolded new Authorization.Autorest files

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tools/ExecuteCIStep.ps1 Added Write-Host debug statements in TestAutorest
src/Resources/Resources/help/Save-AzManagementGroupDeploymentStackTemplate.md Fixed typo in parameter set name
src/Resources/Resources/help/New-AzRoleEligibilityScheduleRequest.md Fixed spelling of “eligible”
src/Resources/Resources/help/Get-AzRoleEligibleChildResource.md Corrected filter variable name typo
src/Resources/Resources/help/Get-AzManagementGroupDeploymentStack.md Fixed typo in parameter set name

Comment on lines 301 to 324
Write-Host "--------------------------------- TestAutorest step 1 ---------------------------------"
If (-not (Test-Path "$AutorestDirectory/test-module.ps1"))
{
Write-Warning "There is no test-module.ps1 found in the folder: $AutorestDirectory"
Return
}
Write-Host "--------------------------------- TestAutorest step 2 ---------------------------------"
$ModuleName = Split-Path -Path $AutorestDirectory | Split-Path -Leaf
Write-Host "--------------------------------- TestAutorest step 3 ---------------------------------"
$ModuleFolderName = $ModuleName.Split(".")[1]
Write-Host "--------------------------------- TestAutorest step 4 ---------------------------------"
If (Test-Path $CIPlanPath)
{
Write-Host "--------------------------------- TestAutorest step 5 ---------------------------------"
$CIPlan = Get-Content $CIPlanPath | ConvertFrom-Json
Write-Host "--------------------------------- TestAutorest step 6 ---------------------------------"
If (-not ($CIPlan.test.Contains($ModuleFolderName)))
{
Write-Debug "Skip test for $ModuleName because it is not in the test plan."
Return
}
Write-Host "--------------------------------- TestAutorest step 7 ---------------------------------"
. $AutorestDirectory/test-module.ps1
Write-Host "--------------------------------- TestAutorest step 8 ---------------------------------"
Copy link
Preview

Copilot AI Jul 8, 2025

Choose a reason for hiding this comment

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

[nitpick] These Write-Host statements appear to be temporary debug logs; consider converting them to Write-Verbose or removing them to keep CI logs clean.

Suggested change
Write-Host "--------------------------------- TestAutorest step 1 ---------------------------------"
If (-not (Test-Path "$AutorestDirectory/test-module.ps1"))
{
Write-Warning "There is no test-module.ps1 found in the folder: $AutorestDirectory"
Return
}
Write-Host "--------------------------------- TestAutorest step 2 ---------------------------------"
$ModuleName = Split-Path -Path $AutorestDirectory | Split-Path -Leaf
Write-Host "--------------------------------- TestAutorest step 3 ---------------------------------"
$ModuleFolderName = $ModuleName.Split(".")[1]
Write-Host "--------------------------------- TestAutorest step 4 ---------------------------------"
If (Test-Path $CIPlanPath)
{
Write-Host "--------------------------------- TestAutorest step 5 ---------------------------------"
$CIPlan = Get-Content $CIPlanPath | ConvertFrom-Json
Write-Host "--------------------------------- TestAutorest step 6 ---------------------------------"
If (-not ($CIPlan.test.Contains($ModuleFolderName)))
{
Write-Debug "Skip test for $ModuleName because it is not in the test plan."
Return
}
Write-Host "--------------------------------- TestAutorest step 7 ---------------------------------"
. $AutorestDirectory/test-module.ps1
Write-Host "--------------------------------- TestAutorest step 8 ---------------------------------"
Write-Verbose "--------------------------------- TestAutorest step 1 ---------------------------------"
If (-not (Test-Path "$AutorestDirectory/test-module.ps1"))
{
Write-Warning "There is no test-module.ps1 found in the folder: $AutorestDirectory"
Return
}
Write-Verbose "--------------------------------- TestAutorest step 2 ---------------------------------"
$ModuleName = Split-Path -Path $AutorestDirectory | Split-Path -Leaf
Write-Verbose "--------------------------------- TestAutorest step 3 ---------------------------------"
$ModuleFolderName = $ModuleName.Split(".")[1]
Write-Verbose "--------------------------------- TestAutorest step 4 ---------------------------------"
If (Test-Path $CIPlanPath)
{
Write-Verbose "--------------------------------- TestAutorest step 5 ---------------------------------"
$CIPlan = Get-Content $CIPlanPath | ConvertFrom-Json
Write-Verbose "--------------------------------- TestAutorest step 6 ---------------------------------"
If (-not ($CIPlan.test.Contains($ModuleFolderName)))
{
Write-Debug "Skip test for $ModuleName because it is not in the test plan."
Return
}
Write-Verbose "--------------------------------- TestAutorest step 7 ---------------------------------"
. $AutorestDirectory/test-module.ps1
Write-Verbose "--------------------------------- TestAutorest step 8 ---------------------------------"

Copilot uses AI. Check for mistakes.

@@ -12,7 +12,7 @@ Saves a Management Group scoped Deployment Stack Template.

## SYNTAX

### SaveByNameAndManagementGroupId (Default)
### SaveByNameAndManagmentGroupId (Default)
Copy link
Preview

Copilot AI Jul 8, 2025

Choose a reason for hiding this comment

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

Typo in 'ManagmentGroupId'; it should be 'ManagementGroupId'.

Suggested change
### SaveByNameAndManagmentGroupId (Default)
### SaveByNameAndManagementGroupId (Default)

Copilot uses AI. Check for mistakes.

@@ -27,7 +27,7 @@ Creates a role eligibility schedule request.

## EXAMPLES

### Example 1: Create a new role eligible schedule request as Admin
### Example 1: Create a new role eligibile schedule request as Admin
Copy link
Preview

Copilot AI Jul 8, 2025

Choose a reason for hiding this comment

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

Typo in 'eligibile'; it should be 'eligible'.

Suggested change
### Example 1: Create a new role eligibile schedule request as Admin
### Example 1: Create a new role eligible schedule request as Admin

Copilot uses AI. Check for mistakes.

@@ -49,7 +49,7 @@ Get all child resources of a resource `scope` that the calling user has eligible
### Example 2: List all child resources filtered by resource type
```powershell
$scope = "/subscriptions/38ab2ccc-3747-4567-b36b-9478f5602f0d/"
$filter = "resourceType eq 'resourcegroup'"
$filter = "resoureType eq 'resourcegroup'"
Copy link
Preview

Copilot AI Jul 8, 2025

Choose a reason for hiding this comment

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

Typo in 'resoureType'; it should be 'resourceType'.

Suggested change
$filter = "resoureType eq 'resourcegroup'"
$filter = "resourceType eq 'resourcegroup'"

Copilot uses AI. Check for mistakes.

@@ -12,7 +12,7 @@ Gets Management Group scoped Deployment Stacks.

## SYNTAX

### ListByManagementGroupId (Default)
### ListByManagmentGroupId (Default)
Copy link
Preview

Copilot AI Jul 8, 2025

Choose a reason for hiding this comment

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

Typo in 'ManagmentGroupId'; it should be 'ManagementGroupId'.

Suggested change
### ListByManagmentGroupId (Default)
### ListByManagementGroupId (Default)

Copilot uses AI. Check for mistakes.

@YanaXu
Copy link
Contributor Author

YanaXu commented Jul 14, 2025

Add a timestamp.

@YanaXu YanaXu closed this Jul 21, 2025
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.

4 participants