-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEAT]: Allow to configure secret using IConfiguration instance #567
Comments
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with |
I think #550 might be a solution to what you're after? |
Hey @JamieMagee! Thanks for the reply! Switching to new HostBuilder()
.ConfigureServices(collection =>
{
collection.AddSingleton<WebhookEventProcessor, MyWebhookEventProcessor>();
collection.AddOptions<GitHubWebhooksOptions>()
.Configure<IConfiguration>((options, configuration) =>
{
options.Secret = configuration["GitHubWebhookSecret"];
});
})
.ConfigureFunctionsWorkerDefaults()
.Build()
.Run(); Which is not ideal, since I would need to keep this updated as the package evolves. What I'm suggesting is not to move away from .ConfigureGitHubWebhooks((configuration) => configuration.GetValue<string>("GitHubWebhookSecret")) |
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 configureGitHubWebhooksOptions
). I suggest adding a configuration extension method that accepts aFunc<IConfiguration, string>
to retrieve the secret from configuration sources, allowing for a more dynamic configuration.SDK Version
No response
API Version
No response
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: