8000 Arg depend by SimonWahlin · Pull Request #369 · PSBicep/PSBicep · GitHub < 10BC0 meta name="color-scheme" content="light dark" />
[go: up one dir, main page]

Skip to content

Conversation

@SimonWahlin
Copy link
Member

This pull request introduces several changes to the repository, focusing on improving module dependencies, removing unused private functions, enhancing session management, and updating tests for consistency. Below is a categorized summary of the most important changes:

Dependency Updates

  • Updated AzAuth module version from 2.4.0 to 2.6.0 in RequiredModules.psd1. Added dependency on AzResourceGraph module with version 0.2.1.

Code Cleanup

  • Removed unused private functions: WriteErrorStream, GetAzResourceGraphPage, and Search-AzureResourceGraph.
  • Renamed references to Get-AzToken parameter -TenantId to use the updated name -Tenant
  • Updated Export-BicepResource function to use Search-AzResourceGraph instead of the removed Search-AzureResourceGraph.

New Features

  • Added documentation for a new cmdlet Disconnect-Bicep

Test Updates

  • Updated tests for Connect-Bicep to reflect the property name change from TenantId to Tenant and clarified descriptions for certificate path tests.

As part of this Pull Request I have

  • Checked for duplicate Pull Requests
  • Associated it with relevant issues, for tracking and closure.
  • Ensured my code/branch is up-to-date with the latest changes in the main branch
  • Performed testing.
  • Verified build scripts work.
  • Updated relevant and associated documentation.

@SimonWahlin SimonWahlin requested review from PalmEmanuel and Copilot and removed request for Copilot July 9, 2025 10:44
@SimonWahlin SimonWahlin added the enhancement New feature or request label Jul 9, 2025
Copy link
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 cleans up custom Azure Resource Graph helpers by leveraging the official AzResourceGraph module, standardizes the tenant parameter name, and documents a new Disconnect-Bicep cmdlet.

  • Updated module dependencies and removed private Graph functions
  • Renamed TenantId to Tenant in Connect-Bicep and its tests
  • Added help file for Disconnect-Bicep

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Tests/Connect-Bicep.Tests.ps1 Updated assertions and test titles to use the renamed Tenant param
Source/Public/Export-BicepResource.ps1 Replaced custom Search-AzureResourceGraph with Search-AzResourceGraph
Source/Public/Connect-Bicep.ps1 Changed TokenSplat key from TenantId to Tenant
Source/Private/WriteErrorStream.ps1 Removed unused helper function
Source/Private/Search-AzureResourceGraph.ps1 Removed unused helper function
Source/Private/GetAzResourceGraphPage.ps1 Removed unused helper function
RequiredModules.psd1 Bumped AzAuth to 2.6.0 and added AzResourceGraph dependency
Docs/Help/Disconnect-Bicep.md Added documentation for the new Disconnect-Bicep cmdlet
CHANGELOG.md Documented removal of private Graph functions
.github/actions/build/action.yml Adjusted SemVer formatting logic
Comments suppressed due to low confidence (4)

Docs/Help/Disconnect-Bicep.md:41

  • The OUTPUTS section lists System.Object, but Disconnect-Bicep does not emit any objects. Update this to 'None' or clarify what (if anything) is returned.
### System.Object

Tests/Connect-Bicep.Tests.ps1:95

  • [nitpick] The test description uses 'certstore' as a single word; consider changing to 'certificate store' for consistency and clarity.
            It 'Should connect using Certificate as path to certstore' {

Tests/Connect-Bicep.Tests.ps1:1

  • There are no unit tests covering the new Disconnect-Bicep cmdlet. Consider adding tests to verify that session data and cached tokens are cleared appropriately.
BeforeAll {

@github-actions
Copy link
Contributor
github-actions bot commented Jul 9, 2025

Linux Test Results

  1 files  ±0   61 suites  ±0   5s ⏱️ ±0s
213 tests  - 2  213 ✅  - 2  0 💤 ±0  0 ❌ ±0 
213 runs   - 3  213 ✅  - 3  0 💤 ±0  0 ❌ ±0 

Results for commit 685bba0. ± Comparison against base commit f578f05.

This pull request removes 4 and adds 2 tests. Note that renamed tests count towards both.
Connect-Bicep tests.Certificate tests.Should connect using Certificate as path
Module Bicep.Validate private functions.Private function 'GetAzResourceGraphPage' has not been exported
Module Bicep.Validate private functions.Private function 'Search-AzureResourceGraph' has not been exported
Module Bicep.Validate private functions.Private function 'WriteErrorStream' has not been exported
Connect-Bicep tests.Certificate tests.Should connect using Certificate as path to certstore
Connect-Bicep tests.Certificate tests.Should connect using Certificate as path to pfx

@github-actions
Copy link
Contributor
github-actions bot commented Jul 9, 2025

Win Test Results

  1 files  ±0   61 suites  ±0   5s ⏱️ ±0s
213 tests  - 2  213 ✅  - 2  0 💤 ±0  0 ❌ ±0 
213 runs   - 3  213 ✅  - 3  0 💤 ±0  0 ❌ ±0 

Results for commit 685bba0. ± Comparison against base commit f578f05.

This pull request removes 4 and adds 2 tests. Note that renamed tests count towards both.
Connect-Bicep tests.Certificate tests.Should connect using Certificate as path
Module Bicep.Validate private functions.Private function 'GetAzResourceGraphPage' has not been exported
Module Bicep.Validate private functions.Private function 'Search-AzureResourceGraph' has not been exported
Module Bicep.Validate private functions.Private function 'WriteErrorStream' has not been exported
Connect-Bicep tests.Certificate tests.Should connect using Certificate as path to certstore
Connect-Bicep tests.Certificate tests.Should connect using Certificate as path to pfx

@SimonWahlin SimonWahlin merged commit a30e01c into main Jul 9, 2025
8 of 9 checks passed
@SimonWahlin SimonWahlin deleted the ARGDepend branch July 9, 2025 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0