dotnet library that help you to handle the Github webhooks with typed objects.
DEPRECATED: USE octokit/webhooks.net
- PullRequest
- Stargazer
- Issues
- Ping
- Watch
- Others (None handled events)
- All (All events)
Use the nuget manager to install it.
dotnet add package Andler.Github.Webhook
// Startup.cs
services.AddSingleton<IGithubWebhookHandlerSettings, GithubWebhookHandlerSettingsImplementation>();
services.AddTransient<IGithubEventHandler, GithubEventHandlerImplementation1>();
services.AddTransient<IGithubEventHandler, GithubEventHandlerImplementation2>();
services.AddGithubWebhookHandler();
// In your controller inject IGithubWebhookHandler
await _githubWebhookHandler.Handler(payload, name, id, userAgent, signature);
You need at least one IGithubEventHandler
implementation.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.