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