Skip to content

[FEAT]: Allow to configure secret using IConfiguration instance #567

@ganhammar

Description

@ganhammar

Describe the need

Currently, it's only possible to configure GitHub webhooks secret by passing the string to ConfigureGitHubWebhooks (at least if you don't manually want to configure GitHubWebhooksOptions). I suggest adding a configuration extension method that accepts a Func<IConfiguration, string> to retrieve the secret from configuration sources, allowing for a more dynamic configuration.

new HostBuilder()
    .ConfigureServices(collection =>
    {
        collection.AddSingleton<WebhookEventProcessor, MyWebhookEventProcessor>();
    })
    .ConfigureGitHubWebhooks((configuration) => configuration.GetValue<string>("GitHubWebhookSecret"))
    .ConfigureFunctionsWorkerDefaults()
    .Build()
    .Run();

SDK Version

No response

API Version

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions