functions/internal/Get-GithubHeaders.ps1

function Get-GithubHeaders{
    process{ 
        $PAT = Get-CustomerConfig -XPath "//credential[@name='GithubPAT']//@value"

        $encodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes("$($PAT):x-oauth-basic"))
        $headers = @{ 
            Authorization = "Basic $encodedCreds" 
        }

        $headers
    }
}