Skip to content

feat(searchHubber): implement search functionality for hubbers by Name or Handle#4

Merged
rulasg merged 4 commits into
mainfrom
search-hubber
Oct 1, 2025
Merged

feat(searchHubber): implement search functionality for hubbers by Name or Handle#4
rulasg merged 4 commits into
mainfrom
search-hubber

Conversation

@rulasg

@rulasg rulasg commented Oct 1, 2025

Copy link
Copy Markdown
Owner

Introduce the Search-Hubber function to allow querying hubbers based on their Name or Handle. Update the Get-Hubber function to enhance parameter handling. Add unit tests to validate the search functionality across various scenarios.


[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments','',Scope='function')]
$WarningParameters = @{
WarningAction = 'SilentlyContinue'

Check notice

Code scanning / PSScriptAnalyzer

Line has trailing whitespace Note

Line has trailing whitespace

$TEST_TRANSCRIPT_FILE = "test_transcript.log"

function Start-MyTranscript {

Check warning

Code scanning / PSScriptAnalyzer

Function 'Start-MyTranscript' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. Warning

Function 'Start-MyTranscript' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'.
Start-Transcript -Path $TEST_TRANSCRIPT_FILE
}

function Stop-MyTranscript {

Check warning

Code scanning / PSScriptAnalyzer

Function 'Stop-MyTranscript' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. Warning

Function 'Stop-MyTranscript' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'.
Mock_Database

Start-MyTranscript
$result = search-Hubber @ErrorParameters

Check warning

Code scanning / PSScriptAnalyzer

The variable 'result' is assigned but never used. Warning

The variable 'result' is assigned but never used.
Comment thread public/getHubber.ps1
[CmdletBinding()]
param (
[Parameter(Position=0)][string]$Handle,
[Parameter(ValueFromPipeline,ValueFromPipelineByPropertyName,Position=0)][string]$Handle,

Check warning

Code scanning / PSScriptAnalyzer

Command accepts pipeline input but has not defined a process block. Warning

Command accepts pipeline input but has not defined a process block.
Comment thread public/getHubber.ps1
[CmdletBinding()]
param (
[Parameter(Position=0)][string]$Handle,
[Parameter(ValueFromPipeline,ValueFromPipelineByPropertyName,Position=0)][string]$Handle,

Check warning

Code scanning / PSScriptAnalyzer

Command accepts pipeline input but has not defined a process block. Warning

Command accepts pipeline input but has not defined a process block.
Comment thread public/searchhubber.ps1
@@ -0,0 +1,29 @@
function Search-Hubber {

Check notice

Code scanning / PSScriptAnalyzer

The cmdlet 'Search-Hubber' does not have a help comment. Note

The cmdlet 'Search-Hubber' does not have a help comment.
Comment thread public/searchhubber.ps1

$isName = -not [string]::IsNullOrEmpty($Name)
$isHandle = -not [string]::IsNullOrEmpty($Handle)

Check notice

Code scanning / PSScriptAnalyzer

Line has trailing whitespace Note

Line has trailing whitespace
Comment thread public/searchhubber.ps1
Write-MyError -Message "Please specify either Name or Handle, or both."
return $null
}

Check notice

Code scanning / PSScriptAnalyzer

Line has trailing whitespace Note

Line has trailing whitespace
@rulasg rulasg merged commit 5da7509 into main Oct 1, 2025
3 checks passed
@rulasg rulasg deleted the search-hubber branch October 1, 2025 15:39
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.

2 participants