From 613c5a8165778112bf05d966a022bff003c7e065 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 16 Dec 2024 00:35:56 +0100 Subject: [PATCH] Remove null or empty values from parameters in Get-GitHubRepository function --- .../Repositories/Get-GitHubRepository.ps1 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/functions/public/Repositories/Repositories/Get-GitHubRepository.ps1 b/src/functions/public/Repositories/Repositories/Get-GitHubRepository.ps1 index 789a647a..01def1b5 100644 --- a/src/functions/public/Repositories/Repositories/Get-GitHubRepository.ps1 +++ b/src/functions/public/Repositories/Repositories/Get-GitHubRepository.ps1 @@ -192,7 +192,7 @@ filter Get-GitHubRepository { PerPage = $PerPage Since = $Since Before = $Before - } + } | Remove-HashtableEntry -NullOrEmptyValues $params | Format-Table -AutoSize | Out-String | ForEach-Object { Write-Debug $_ } Get-GitHubMyRepositories @params } @@ -206,7 +206,7 @@ filter Get-GitHubRepository { PerPage = $PerPage Since = $Since Before = $Before - } + } | Remove-HashtableEntry -NullOrEmptyValues $params | Format-Table -AutoSize | Out-String | ForEach-Object { Write-Debug $_ } Get-GitHubMyRepositories @params } @@ -215,7 +215,7 @@ filter Get-GitHubRepository { Context = $Context Owner = $Owner Repo = $Repo - } + } | Remove-HashtableEntry -NullOrEmptyValues $params | Format-Table -AutoSize | Out-String | ForEach-Object { Write-Debug $_ } Get-GitHubRepositoryByName @params } @@ -223,7 +223,7 @@ filter Get-GitHubRepository { $params = @{ Context = $Context Since = $SinceID - } + } | Remove-HashtableEntry -NullOrEmptyValues $params | Format-Table -AutoSize | Out-String | ForEach-Object { Write-Debug $_ } Get-GitHubRepositoryListByID @params } @@ -235,7 +235,7 @@ filter Get-GitHubRepository { Sort = $Sort Direction = $Direction PerPage = $PerPage - } + } | Remove-HashtableEntry -NullOrEmptyValues $params | Format-Table -AutoSize | Out-String | ForEach-Object { Write-Debug $_ } Get-GitHubRepositoryListByOrg @params } @@ -247,7 +247,7 @@ filter Get-GitHubRepository { Sort = $Sort Direction = $Direction PerPage = $PerPage - } + } | Remove-HashtableEntry -NullOrEmptyValues $params | Format-Table -AutoSize | Out-String | ForEach-Object { Write-Debug $_ } Get-GitHubRepositoryListByUser @params }