Skip to content
This repository was archived by the owner on Jan 5, 2022. It is now read-only.

3cpt/andler-github-webhook

Repository files navigation

Andler.Github.Webhook

dotnet library that help you to handle the Github webhooks with typed objects.

DEPRECATED: USE octokit/webhooks.net

Events available

  • PullRequest
  • Stargazer
  • Issues
  • Ping
  • Watch
  • Others (None handled events)
  • All (All events)

Installation

Use the nuget manager to install it.

dotnet add package Andler.Github.Webhook

Usage

// 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.

Contributing

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.

License

MIT

Packages

No packages published

Languages