-
Notifications
You must be signed in to change notification settings - Fork 5
feat: Add Team and WorkItems cmdlets #72
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
Open
magusdevs
wants to merge
76
commits into
WeAreInSpark:main
Choose a base branch
from
magusdevs:feature/teams-boards
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
76 commits
Select commit
Hold shift + click to select a range
356a5a1
feat: Add support for workitems and team settings
18e6bb4
Merge branch 'main' into feature/teams-boards
magusdevs 6cd93ff
Merge branch 'main' into feature/teams-boards
Manbearpiet 26d879d
refactor: Improve error handling and messaging across multiple functions
Manbearpiet c3a8b1c
fix: Enhance error handling for team retrieval in Get-AzDoTeamSetting…
Manbearpiet aab2400
fix: Update API version in Get-AzDoWorkItem function and add support …
Manbearpiet 4d6782d
fix: Add ValueFromPipelineByPropertyName to parameters in Get-AzDoWor…
Manbearpiet ae8f9c2
fix: Add WorkItemId to output in Get-AzDoWorkItem function
Manbearpiet 50e10e5
fix: Update New-AzDoWorkItem function to include WorkItemId and addit…
Manbearpiet 816660b
fix: Enhance Remove-AzDoWorkItem function to include deleted date and…
Manbearpiet a668c21
fix: Add ValueFromPipelineByPropertyName to parameters in Set-AzDoWor…
Manbearpiet 64a73eb
fix: Update documentation for various cmdlets to improve output forma…
Manbearpiet 7f73e56
fix: Improve verbosity in Get-AzDoProject function for better debuggi…
Manbearpiet 36e4a78
fix: Refactor New-AzDoProject function to streamline processing and i…
Manbearpiet d2defa7
fix: Enhance Remove-AzDoProject function with error handling and impr…
Manbearpiet 06f5cba
fix: Add error handling and improve verbosity in Get-AzDoTeam function
Manbearpiet 5874278
fix: Improve verbosity and streamline processing in Add-AzDoVariableG…
Manbearpiet 1664c13
fix: Add error handling and improve output structure in Get-AzDoVaria…
Manbearpiet 5457a87
fix: Enhance New-AzDoVariableGroup function with error handling and i…
Manbearpiet 11143f9
fix: Add error handling and improve output structure in Get-AzDoEnvir…
Manbearpiet f038fa9
fix: Improve verbosity in Get-AzDoEnvironment function
Manbearpiet 845548d
fix: Enhance Get-AzDoRepo function with improved verbosity and stream…
Manbearpiet fb00379
fix: Improve verbosity and streamline output in Get-AzDoPipeline func…
Manbearpiet 2abc8a7
fix: Remove unnecessary verbose output in Get-AzDoPipeline function
Manbearpiet d09f49b
fix: Enhance Set-AzDoBranchPolicyBuildValidation function with improv…
Manbearpiet d67e261
fix: Improve verbosity and streamline output in Set-AzDoBranchPolicyC…
Manbearpiet acdce96
fix: Add error handling for policy creation in Set-AzDoBranchPolicyCo…
Manbearpiet b421327
fix: Add error handling and improve verbosity in Set-AzDoBranchPolicy…
Manbearpiet 6995fde
fix: Add error handling and improve verbosity in Set-AzDoBranchPolicy…
Manbearpiet f3e9081
fix: Add error handling and improve verbosity in Get-AzDoBranchPolicy…
Manbearpiet 742572a
refactor: Streamline Get-AzDoClassificationNode function and improve …
Manbearpiet 0e5277f
fix: Add error handling and improve verbosity in Remove-AzDoClassific…
Manbearpiet 9931392
fix: Improve verbosity in Add-AzDoPipelineBranchControl function
Manbearpiet 4cee34e
fix: Add verbosity to Set-AzDOProjectSetting function
Manbearpiet fdb97e9
fix: Improve verbosity in Set-AzDoTeamSettings function
Manbearpiet 3a5da3b
fix: Add verbosity to Get-AzDoVariableGroup function
Manbearpiet 09c319e
fix: Add verbosity to New-AzDoEnvironment function
Manbearpiet 9d04b87
fix: Improve verbosity in New-AzDoPullRequest function
Manbearpiet 65fcb41
fix: Add verbosity to Add-FilesToRepo function
Manbearpiet a58a636
fix: Add verbosity to New-AzDoRepo function
Manbearpiet 7867bb3
fix: Add verbosity to Get-AzDoBranchPolicy function
Manbearpiet 7056ec6
fix: Add verbosity to Test-AzDoServiceConnection function
Manbearpiet 07f1c76
fix: Enhance verbosity in Get-AzDoServiceConnection function
Manbearpiet edc1cf4
fix: Add verbose logging to New-AzDoServiceConnection function
Manbearpiet 362fe39
fix: Remove unused variable in Get-AzDoServiceConnection function
Manbearpiet f25f32f
fix: Add error handling to Add-AzDoPipelineBranchControl function
Manbearpiet 6df61cc
fix: Add error handling to Test-AzDoServiceConnection function
Manbearpiet 63e3127
fix: Add error handling to Get-AzDoProject function
Manbearpiet fb9b0d5
fix: Add error handling to Add-AzDoVariableGroupVariable function
Manbearpiet 577ff07
fix: Add error handling to Get-AzDoRepo function
Manbearpiet e10ded1
fix: Add error handling to Get-AzDoPipeline function
Manbearpiet 193717c
fix: Add error handling to Get-PipelineRun function
Manbearpiet aded3d5
fix: Add error handling to Get-AzDoBranchPolicy function
Manbearpiet 9e7aa5d
fix: Add error handling to Set-AzDoBranchPolicyBuildValidation function
Manbearpiet e04d7a2
fix: Add error handling to Get-AzDoServiceConnection function
Manbearpiet 7f02a4f
fix: Add error handling to New-AzDoServiceConnection function
Manbearpiet 9c198c0
fix: Add error handling to Get-AzDoClassificationNode function
Manbearpiet 942496d
fix: Enhance error handling in Remove-AzDoProject function
Manbearpiet 808512c
fix: Update parameter attributes in New-AzDoTeam function for pipelin…
Manbearpiet 2563ff3
fix: Correct typo in DefaultIteration property in Get-AzDoTeamSetting…
Manbearpiet 5c2c31b
fix: Update parameter attributes in Remove-AzDoTeam function for pipe…
Manbearpiet 98429d7
fix: Improve team deletion logic in Remove-AzDoTeam function for bett…
Manbearpiet 49ffb89
docs: fix examples in New-AzDoVariableGroup function
Manbearpiet b0de18b
fix: Enable pipeline input for parameters in New-AzDoVariableGroup do…
Manbearpiet da71e1a
fix: Add support for PUT method in Invoke-AzDoRestMethod function
Manbearpiet b89990a
fix: Refactor Add-AzDoVariableGroupVariable function for improved var…
Manbearpiet 2f66f39
fix: Simplify variable group retrieval logic in Get-AzDoVariableGroup…
Manbearpiet ccc53b2
fix: Correct verbose message in Get-AzDoVariableGroup function for cl…
Manbearpiet 2f3a2ff
fix: Enhance variable output formatting in New-AzDoVariableGroup func…
Manbearpiet 4afb014
Merge branch 'main' into feature/teams-boards
Dylan-Prins 67ae4e2
Merge branch 'main' into feature/teams-boards
Dylan-Prins 044a123
fix: fix help
Dylan-Prins 9042a11
fix: disable tests for now
Dylan-Prins c403b7c
fix: fixing pester tests
Dylan-Prins deff32c
fix: disable test
Dylan-Prins db145b5
fix: fixing help test
Dylan-Prins File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
87 changes: 87 additions & 0 deletions
87
AzureDevOpsPowerShell/Public/Api/Core/TeamSettings/Get-AzDoTeamSettings.ps1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| function Get-AzDoTeamSettings { | ||
| <# | ||
| .SYNOPSIS | ||
| Get the settings of a Team in Azure DevOps. | ||
| .DESCRIPTION | ||
| Get the settings of a Team or multiple in Azure DevOps. | ||
| .EXAMPLE | ||
| $Params = @{ | ||
| CollectionUri = "https://dev.azure.com/cantoso" | ||
| ProjectName = "Playground" | ||
| TeamName = "Team1" | ||
| } | ||
|
|
||
| Get-AzDoTeamSettings @Params | ||
|
|
||
| This example will get the settings of the team 'Team1' in the project 'Playground'. | ||
| .OUTPUTS | ||
| PSObject with the settings of the team(s). | ||
| #> | ||
|
|
||
| [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Low')] | ||
| param ( | ||
| # Collection Uri of the organization | ||
| [Parameter(Mandatory, ValueFromPipelineByPropertyName)] | ||
| [ValidateScript({ Validate-CollectionUri -CollectionUri $_ })] | ||
| [string] | ||
| $CollectionUri, | ||
|
|
||
| # Name of the project where the team is located | ||
| [Parameter(Mandatory, ValueFromPipelineByPropertyName)] | ||
| [string] | ||
| $ProjectName, | ||
|
|
||
| # Name of the team to get the settings from | ||
| [Parameter(Mandatory, ValueFromPipelineByPropertyName)] | ||
| [string[]] | ||
| $TeamName | ||
| ) | ||
| process { | ||
| Write-Verbose "Starting function: Get-AzDoTeamSettings" | ||
Manbearpiet marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| $CollectionUri = $CollectionUri.TrimEnd('/') | ||
|
|
||
| foreach ($Name in $TeamName) { | ||
| try { | ||
| $team = Get-AzDoTeam -CollectionUri $CollectionUri -ProjectName $ProjectName -TeamName $Name | ||
| if (-not $team) { | ||
| Write-Error "Team '$Name' not found in project '$ProjectName'." | ||
| continue | ||
| } | ||
| } catch { | ||
| Write-Error "Failed to get team '$Name' in project '$ProjectName'. Error: $_" | ||
| continue | ||
| } | ||
|
|
||
| $params = @{ | ||
Manbearpiet marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| uri = "$CollectionUri/$ProjectName/$Name/_apis/work/teamSettings" | ||
| method = 'GET' | ||
| version = '7.1-preview.1' | ||
| } | ||
|
|
||
| if ($PSCmdlet.ShouldProcess("Get team settings for team '$Name' in project '$ProjectName'")) { | ||
| try { | ||
| Invoke-AzDoRestMethod @params | ForEach-Object { | ||
| [PSCustomObject]@{ | ||
| CollectionUri = $CollectionUri | ||
| ProjectName = $ProjectName | ||
| TeamName = $Name | ||
| TeamId = ($_.url -split '/')[-4] | ||
| BacklogIteration = $_.backlogIteration | ||
| BacklogVisibilities = $_.backlogVisibilities | ||
| DefaultIteration = $_.defaultIteration | ||
| DefaultIterationMacro = $_.defaultIterationMacro | ||
| WorkingDays = $_.workingDays | ||
| BugsBehavior = $_.bugsBehavior | ||
| Url = $_.url | ||
| } | ||
| } | ||
| } catch { | ||
| Write-Error "Failed to get settings for team '$name' in $projectName Error: $_" | ||
| continue | ||
| } | ||
| } else { | ||
| Write-Verbose "Skipping team settings for team '$Name' in project '$ProjectName'." | ||
| } | ||
| } | ||
| } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.