Get-AdoPicklist -Orphan bugfix for on-premises AzD Server#209
Get-AdoPicklist -Orphan bugfix for on-premises AzD Server#209norschel wants to merge 6 commits intoStartAutomating:masterfrom
Conversation
There was a problem hiding this comment.
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-ADOPicklistorphan 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 = @() |
There was a problem hiding this comment.
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.
| $allUsedPicklists = @() |
3ffa275 to
347e4f9
Compare
…n Get-ADOPicklist for AzD Server
…rmission function
347e4f9 to
c13f994
Compare
Co-authored-by: Copilot <[email protected]>
…ng in Remove-ADOPicklist function
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Select-Object -ExpandProperty PicklistID | ||
| } | ||
| else { | ||
| Write-Verbose "AzD Server currently is: $Server/$organization" |
There was a problem hiding this comment.
Corrected abbreviation from 'AzD' to 'ADO' to match the naming convention used throughout the codebase (Azure DevOps = ADO).
| Write-Verbose "AzD Server currently is: $Server/$organization" | |
| Write-Verbose "ADO Server currently is: $Server/$organization" |
|
@StartAutomating do you need any changes so that this pr can be merged into main? |
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).