Skip to content

Conversation

@norschel
Copy link

This pull request fixes incorrect URL handling for on-premises Azure DevOps Server in the get-adopicklist function when the -orphan switch is used.

In addition, users are now warned when using the outdated 5.0 API version and encouraged to switch to version 7.0 (AZD 2022).

Copilot AI review requested due to automatic review settings October 24, 2025 09:15
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 fixes incorrect URL handling for on-premises Azure DevOps Server in the Get-ADOPicklist function when the -Orphan switch is used. Additionally, it introduces API version warnings to encourage users to upgrade from the outdated 5.0 API version to 7.0 or later.

Key Changes:

  • Fixed URL construction for on-premises Azure DevOps Server in Get-ADOPicklist orphan picklist detection
  • Added API version 5.x compatibility warnings across multiple functions (Get-ADOPicklist, Get-ADOField, Remove-ADOPermission)
  • Code formatting improvements (brace placement standardization)

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
Functions/AzureDevOps/Get-ADOPicklist.ps1 Added conditional logic to handle on-premises server URLs correctly when detecting orphaned picklists, and added API version warning
Functions/AzureDevOps/Get-ADOField.ps1 Added API version 5.x compatibility warning for field operations
Functions/AzureDevOps/Remove-ADOPermission.ps1 Added API version 5.x compatibility warning and standardized brace formatting

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

$allPicklists = Get-ADOPicklist -Organization $organization
$allUsedPicklists = Get-ADOField @invokeParams -Organization $Organization |
$allPicklists = @()
$allUsedPicklists = @()
Copy link

Copilot AI Oct 24, 2025

Choose a reason for hiding this comment

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

These variables are initialized but then immediately reassigned in both branches of the if-else statement. The initialization is redundant and should be removed to improve code clarity.

Suggested change
$allUsedPicklists = @()

Copilot uses AI. Check for mistakes.
@norschel norschel force-pushed the topics/AzD_Server_Bugfix_Get_ADO_Picklist branch 2 times, most recently from 3ffa275 to 347e4f9 Compare October 24, 2025 09:33
@norschel norschel force-pushed the topics/AzD_Server_Bugfix_Get_ADO_Picklist branch from 347e4f9 to c13f994 Compare October 24, 2025 09:36
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.

1 participant