Skip to content

🩹 [Patch]: App Context should be able to save the Webhook Secret in context - For Function App scenarios #527

@MariusStorhaug

Description

@MariusStorhaug

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions