Describe the change
When running in Function App scenarios, we should support storing the webhook secret as a secure string, so that when we deploy with IaC, we can store the secret in GitHub Secrets, reference it in a workflow, seed it into IaC, deploy the Key Vault and the secret, and reference the secret when running Connect-GitHub -ClientID (-PrivateKey||-KeyVaultReference) -WebhookSecret This is only applicable for GitHubApp contexts.
$connectParam = @{
ClientID = $env:GITHUB_APP_CLIENT_ID
PrivateKey = $env:GITHUB_APP_PRIVATE_KEY
WebhookSecret = $env:GITHUB_APP_WEBHOOK_SECRET
HostName = $env:GITHUB_HOST_NAME
}
Connect-GitHub @connectParam
$connectParam = @{
ClientID = $env:GITHUB_APP_CLIENT_ID
KeyVaultReference = $env:GITHUB_APP_KEY_VAULT_REFERENCE
WebhookSecret = $env:GITHUB_APP_WEBHOOK_SECRET
HostName = $env:GITHUB_HOST_NAME
}
Connect-GitHub @connectParam