Skip to content

Commit

Permalink
Fixed issue #36 so you can list all repos in an account.
Browse files Browse the repository at this point in the history
  • Loading branch information
DarqueWarrior committed Jan 31, 2018
1 parent c516e5f commit 48301ab
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VSTeam.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
RootModule = ''

# Version number of this module.
ModuleVersion = '2.1.1'
ModuleVersion = '2.1.2'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
9 changes: 9 additions & 0 deletions src/common.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,16 @@ function _buildProjectNameDynamicParam {
$arrSet = _getProjects

if ($arrSet) {
# If $Mandatory is false we need to add '' to the arrSet or they will not be able
# to omit this parameter
if($Mandatory -eq $false){
# We can't use .Add("") because the collection is of a fixed size. But we can
# use += because a new array is created that contains everything we want.
$arrSet += "";
}

Write-Verbose "arrSet = $arrSet"

$ValidateSetAttribute = New-Object System.Management.Automation.ValidateSetAttribute($arrSet)

# Add the ValidateSet to the attributes collection
Expand Down
6 changes: 3 additions & 3 deletions unit/test/git.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ InModuleScope git {

Get-VSTeamGitRepository

It 'Should create VSAccount' {
It 'Should return all repos for all projects' {
Assert-VerifiableMocks
}
}
Expand All @@ -59,7 +59,7 @@ InModuleScope git {

Get-VSTeamGitRepository -id 00000000-0000-0000-0000-000000000000

It 'Should create VSAccount' {
It 'Should return a single repo by id' {
Assert-VerifiableMocks
}
}
Expand All @@ -69,7 +69,7 @@ InModuleScope git {

Get-VSTeamGitRepository -Name 'test'

It 'Should create VSAccount' {
It 'Should return a single repo by name' {
Assert-VerifiableMocks
}
}
Expand Down

0 comments on commit 48301ab

Please sign in to comment.