3cpt / andler-github-webhook

Typed Github webhook handler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Typed Github webhook handler

License:MIT License


Languages

Language:C# 100.0%