From 2198893925095ebd551d5a9326533ca5dacba6d3 Mon Sep 17 00:00:00 2001 From: rulasg Date: Thu, 4 Sep 2025 17:48:47 +0200 Subject: [PATCH] feat(public): add Get-GCRepo to search GitHubCustomers repos by SolutionEngineer handle --- public/getrepos.ps1 | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 public/getrepos.ps1 diff --git a/public/getrepos.ps1 b/public/getrepos.ps1 new file mode 100644 index 0000000..b629266 --- /dev/null +++ b/public/getrepos.ps1 @@ -0,0 +1,26 @@ +<# +.SYNOPSIS +Gets the GitHubCustomers repository owned by a particular SolutionEngineer +.DESCRIPTION +Gets the GitHubCustomers repository owned by a particular SolutionEngineer + +.PARAMETER Handle +The GitHub handle of the SolutionEngineer Custom Property value of the repository owner +#> +function Get-GCRepo { + param ( + [Parameter(Mandatory,Position=0)][string]$PropertyValue, + [Parameter()][string]$PropertyName = 'SolutionEngineer' + ) + $SearchString = "org:githubcustomers props.{property}:{value}" + + $SearchString = $SearchString -replace '{value}', $PropertyValue + $SearchString = $SearchString -replace '{property}', $PropertyName + + $SearchString | Write-Verbose + + $ret = Search-Repo -SearchString $SearchString + + return $ret + +} Export-ModuleMember -Function Get-GCRepo \ No newline at end of file