Octokit.Webhooks
4.0.4
Prefix Reserved
dotnet add package Octokit.Webhooks --version 4.0.4
NuGet\Install-Package Octokit.Webhooks -Version 4.0.4
<PackageReference Include="Octokit.Webhooks" Version="4.0.4" />
<PackageVersion Include="Octokit.Webhooks" Version="4.0.4" />Directory.Packages.props
<PackageReference Include="Octokit.Webhooks" />Project file
paket add Octokit.Webhooks --version 4.0.4
#r "nuget: Octokit.Webhooks, 4.0.4"
#:package Octokit.Webhooks@4.0.4
#addin nuget:?package=Octokit.Webhooks&version=4.0.4Install as a Cake Addin
#tool nuget:?package=Octokit.Webhooks&version=4.0.4Install as a Cake Tool
Octokit.Webhooks
GitHub Workflow Status Octokit.Webhooks NuGet Package Version Octokit.Webhooks NuGet Package Downloads OpenSSF Scorecard
Libraries to handle GitHub Webhooks in .NET applications.
Usage
ASP.NET Core
dotnet add package Octokit.Webhooks.AspNetCoreCreate a class that derives from
WebhookEventProcessorand override any of the virtual methods to handle webhooks from GitHub. For example, to handle Pull Request webhooks:public sealed class MyWebhookEventProcessor : WebhookEventProcessor { protected override ValueTask ProcessPullRequestWebhookAsync( WebhookHeaders headers, PullRequestEvent pullRequestEvent, PullRequestAction action, CancellationToken cancellationToken = default) { ... } }Register your implementation of
WebhookEventProcessor:builder.Services.AddSingleton<WebhookEventProcessor, MyWebhookEventProcessor>();Map the webhook endpoint:
app.UseEndpoints(endpoints => { ... endpoints.MapGitHubWebhooks(); ... });
MapGitHubWebhooks() takes two optional parameters:
path. Defaults to/api/github/webhooks, the URL of the endpoint to use for GitHub.secret. The secret you have configured in GitHub, if you have set this up.
Azure Functions
NOTE: Support is only provided for isolated process Azure Functions.
dotnet add package Octokit.Webhooks.AzureFunctionsCreate a class that derives from
WebhookEventProcessorand override any of the virtual methods to handle webhooks from GitHub. For example, to handle Pull Request webhooks:public sealed class MyWebhookEventProcessor : WebhookEventProcessor { protected override ValueTask ProcessPullRequestWebhookAsync( WebhookHeaders headers, PullRequestEvent pullRequestEvent, PullRequestAction action, CancellationToken cancellationToken = default) { ... } }Register your implementation of
WebhookEventProcessorand configure the webhook function:var builder = FunctionsApplication.CreateBuilder(args); builder.Services.AddSingleton<WebhookEventProcessor, MyWebhookEventProcessor>(); builder.ConfigureGitHubWebhooks(); builder.Build().Run();
ConfigureGitHubWebhooks has two overloads:
ConfigureGitHubWebhooks(string? secret = null). Pass the secret you have configured in GitHub, if you have set this up.ConfigureGitHubWebhooks(Func<IConfiguration, string> configure). Resolve the secret from configuration at runtime.
The function is available on the /api/github/webhooks endpoint.
Thanks
License
All packages in this repository are licensed under the MIT license.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Macross.Json.Extensions (>= 3.0.0)
- Microsoft.Extensions.Primitives (>= 10.0.9)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Octokit.Webhooks:
| Package | Downloads |
|---|---|
|
Octokit.Webhooks.AspNetCore
GitHub webhook events toolset for .NET |
|
|
Octokit.Webhooks.AzureFunctions
GitHub webhook events toolset for Azure Functions |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.4 | 1,018 | 6/28/2026 |
| 4.0.3 | 6,642 | 6/4/2026 |
| 4.0.2 | 3,745 | 5/26/2026 |
| 4.0.1 | 8,399 | 5/12/2026 |
| 4.0.0 | 11,018 | 4/14/2026 |
| 4.0.0-rc.2 | 149 | 4/14/2026 |
| 4.0.0-rc.1 | 156 | 4/14/2026 |
| 3.2.1 | 85,094 | 9/11/2025 |
| 3.1.0 | 5,457 | 9/2/2025 |
| 3.0.0 | 79,456 | 7/18/2025 |
| 2.5.1 | 22,072 | 6/26/2025 |
| 2.5.0 | 390 | 6/26/2025 |
| 2.4.1 | 66,142 | 10/22/2024 |
| 2.4.0 | 6,938 | 10/9/2024 |
| 2.3.0 | 1,980 | 10/2/2024 |
| 2.2.3 | 16,893 | 7/31/2024 |
| 2.2.2 | 8,764 | 6/27/2024 |
| 2.2.1 | 8,892 | 5/9/2024 |
| 2.2.0 | 1,017 | 5/6/2024 |
| 2.1.1 | 9,848 | 2/29/2024 |