diff --git a/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tools/GitHub/Invoke-ExecGitHubAction.ps1 b/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tools/GitHub/Invoke-ExecGitHubAction.ps1 index c84bd7d91ab7..cf0d810d921a 100644 --- a/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tools/GitHub/Invoke-ExecGitHubAction.ps1 +++ b/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tools/GitHub/Invoke-ExecGitHubAction.ps1 @@ -22,7 +22,7 @@ function Invoke-ExecGitHubAction { $SplatParams = $Parameters | Select-Object -ExcludeProperty Action, TenantFilter | ConvertTo-Json | ConvertFrom-Json -AsHashtable - Write-Information ($SplatParams | ConvertTo-Json) + #Write-Information ($SplatParams | ConvertTo-Json) switch ($Action) { 'Search' { diff --git a/Modules/CippExtensions/Public/GitHub/Get-GitHubFileContents.ps1 b/Modules/CippExtensions/Public/GitHub/Get-GitHubFileContents.ps1 index aee61b0c69f0..684bf99927ba 100644 --- a/Modules/CippExtensions/Public/GitHub/Get-GitHubFileContents.ps1 +++ b/Modules/CippExtensions/Public/GitHub/Get-GitHubFileContents.ps1 @@ -1,14 +1,20 @@ function Get-GitHubFileContents { [CmdletBinding()] param ( - [Parameter(ValueFromPipelineByPropertyName = $true)] - $Url + [Parameter(ValueFromPipelineByPropertyName = $true, Mandatory = $true)] + $FullName, + + [Parameter(ValueFromPipelineByPropertyName = $true, Mandatory = $true)] + $Path, + + [Parameter(ValueFromPipelineByPropertyName = $true, Mandatory = $true)] + $Branch ) process { - [uri]$Uri = $Url - $Path = $Uri.PathAndQuery.TrimStart('/') - $File = Invoke-GitHubApiRequest -Path "$Path" -Method GET + $Path = "repos/$($FullName)/contents/$($Path)?ref=$($Branch)" + #Write-Information $Path + $File = Invoke-GitHubApiRequest -Path $Path -Method GET return [PSCustomObject]@{ name = $File.name