Skip to content

Conversation

@aviranjan24
Copy link
Member

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 AI review requested due to automatic review settings November 7, 2025 05:36
@azure-client-tools-bot-prd
Copy link

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

@isra-fel
Copy link
Member

isra-fel commented Nov 7, 2025

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Contributor

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 introduces the initial scaffolding for the Az.DisconnectedOperations module, which is an AutoRest-generated PowerShell module for managing Azure DisconnectedOperations services. The module follows the standard AutoRest PowerShell project structure with configuration files, utility scripts, test infrastructure, and documentation.

Key Changes:

  • Added AutoRest module scaffolding with standard directory structure (custom, test, examples, docs, resources, utils)
  • Created configuration files (tsp-location.yaml, .gitignore, .gitattributes) for build and source control
  • Added utility scripts for secure string handling and test subscription management
  • Established test infrastructure with Pester framework support and environment loading

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
tsp-location.yaml Defines TypeSpec API specification location with placeholders for commit hash and repository
Unprotect-SecureString.ps1 Utility script to convert SecureString to plaintext for testing scenarios
Get-SubscriptionIdTestSafe.ps1 Helper script to retrieve subscription ID in both test playback and live modes
test/loadEnv.ps1 Test environment loader that reads configuration from JSON files
test/README.md Documentation describing Pester test framework usage and testing modes
resources/README.md Documentation for non-runtime module resources
how-to.md Comprehensive development guide for the module
examples/README.md Documentation for cmdlet usage examples
docs/README.md Documentation for auto-generated help files
custom/README.md Documentation for custom cmdlet implementation
custom/Az.DisconnectedOperations.custom.psm1 Module loader for custom PowerShell cmdlets
README.md Main module documentation with requirements and authentication info
Properties/AssemblyInfo.cs .NET assembly metadata and versioning information
.gitignore Git ignore patterns for build artifacts and generated files
.gitattributes Git line ending configuration

Comment on lines +4 to +15
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the ""License"");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an ""AS IS"" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
// is regenerated.
Copy link

Copilot AI Nov 7, 2025

Choose a reason for hiding this comment

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

Inconsistent license header: Lines 1-3 use MIT License, while lines 4-15 use Apache License 2.0. An assembly should have a single, consistent license header.

Please verify which license is correct and remove the duplicate/incorrect license header.

Suggested change
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the ""License"");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an ""AS IS"" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
// is regenerated.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,16 @@
#This script converts securestring to plaintext
Copy link

Copilot AI Nov 7, 2025

Choose a reason for hiding this comment

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

The script comment lacks proper formatting. PowerShell script comments that describe functionality should follow comment-based help standards.

Change to:

# This script converts securestring to plaintext
Suggested change
#This script converts securestring to plaintext
# This script converts securestring to plaintext

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,5 @@
directory: specification/edge/Microsoft.Edge.DisconnectedOperations.Management
commit: <replace with your value>
Copy link

Copilot AI Nov 7, 2025

Choose a reason for hiding this comment

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

The tsp-location.yaml file must use a specific commit hash instead of placeholder text. According to AutoRest README.md guidelines, API specification references should always use specific commit hashes to ensure reproducible builds and prevent breaking changes when the specification repository evolves.

Replace <replace with your value> with an actual commit hash from the specification repository.

Copilot generated this review using guidance from repository custom instructions.
@@ -0,0 +1,5 @@
directory: specification/edge/Microsoft.Edge.DisconnectedOperations.Management
commit: <replace with your value>
repo: <replace with your value>
Copy link

Copilot AI Nov 7, 2025

Choose a reason for hiding this comment

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

The repo field must specify the actual repository URL instead of placeholder text. According to AutoRest README.md guidelines, this should reference the specific repository containing the API specifications (e.g., https://github.com/Azure/azure-rest-api-specs).

Replace <replace with your value> with the actual repository URL.

Copilot generated this review using guidance from repository custom instructions.
if (Test-Path -Path (Join-Path $PSScriptRoot $envFile)) {
$envFilePath = Join-Path $PSScriptRoot $envFile
} else {
$envFilePath = Join-Path $PSScriptRoot '..\$envFile'
Copy link

Copilot AI Nov 7, 2025

Choose a reason for hiding this comment

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

The script uses a backslash in the path string which is Windows-specific. According to PowerShell script guidelines, all scripts must be compatible with Unix-like operating systems (Linux, macOS) and should use cross-platform path handling.

Replace the backslash with Join-Path:

$envFilePath = Join-Path $PSScriptRoot ".." $envFile

Copilot generated this review using guidance from repository custom instructions.
}
$env = @{}
if (Test-Path -Path $envFilePath) {
$env = Get-Content (Join-Path $PSScriptRoot $envFile) | ConvertFrom-Json
Copy link

Copilot AI Nov 7, 2025

Choose a reason for hiding this comment

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

The script uses $envFile when it should use $envFilePath. This will cause the script to fail when the environment file is in the parent directory, as it will try to read from $PSScriptRoot instead of the resolved $envFilePath.

Change line 27 to:

$env = Get-Content $envFilePath | ConvertFrom-Json
Suggested change
$env = Get-Content (Join-Path $PSScriptRoot $envFile) | ConvertFrom-Json
$env = Get-Content $envFilePath | ConvertFrom-Json

Copilot uses AI. Check for mistakes.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
Copy link

Copilot AI Nov 7, 2025

Choose a reason for hiding this comment

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

There is a spacing issue in the copyright notice. There should be a space between "Generator." and "Changes".

Change to:

// Code generated by Microsoft (R) AutoRest Code Generator. Changes may cause incorrect behavior and will be lost if the code
Suggested change
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
# Code generated by Microsoft (R) AutoRest Code Generator. Changes may cause incorrect behavior and will be lost if the code

Copilot uses AI. Check for mistakes.
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
Copy link

Copilot AI Nov 7, 2025

Choose a reason for hiding this comment

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

There is a spacing issue in the copyright notice. There should be a space between "Generator." and "Changes".

Change to:

// Code generated by Microsoft (R) AutoRest Code Generator. Changes may cause incorrect behavior and will be lost if the code
Suggested change
// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
// Code generated by Microsoft (R) AutoRest Code Generator. Changes may cause incorrect behavior and will be lost if the code

Copilot uses AI. Check for mistakes.
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