File tree Expand file tree Collapse file tree
CIPPCore/Public/Entrypoints/HTTP Functions/Tools/GitHub
CippExtensions/Public/GitHub Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ function Invoke-ExecGitHubAction {
2222
2323 $SplatParams = $Parameters | Select-Object - ExcludeProperty Action, TenantFilter | ConvertTo-Json | ConvertFrom-Json - AsHashtable
2424
25- Write-Information ($SplatParams | ConvertTo-Json )
25+ # Write-Information ($SplatParams | ConvertTo-Json)
2626
2727 switch ($Action ) {
2828 ' Search' {
Original file line number Diff line number Diff line change 11function Get-GitHubFileContents {
22 [CmdletBinding ()]
33 param (
4- [Parameter (ValueFromPipelineByPropertyName = $true )]
5- $Url
4+ [Parameter (ValueFromPipelineByPropertyName = $true , Mandatory = $true )]
5+ $FullName ,
6+
7+ [Parameter (ValueFromPipelineByPropertyName = $true , Mandatory = $true )]
8+ $Path ,
9+
10+ [Parameter (ValueFromPipelineByPropertyName = $true , Mandatory = $true )]
11+ $Branch
612 )
713
814 process {
9- [ uri ] $Uri = $Url
10- $Path = $Uri .PathAndQuery.TrimStart ( ' / ' )
11- $File = Invoke-GitHubApiRequest - Path " $Path " - Method GET
15+ $Path = " repos/ $ ( $FullName ) /contents/ $ ( $Path ) ?ref= $ ( $Branch ) "
16+ # Write-Information $Path
17+ $File = Invoke-GitHubApiRequest - Path $Path - Method GET
1218
1319 return [PSCustomObject ]@ {
1420 name = $File.name
You can’t perform that action at this time.
0 commit comments