![]() |
VOOZH | about |
dotnet add package Octokit.Webhooks --version 4.0.3
NuGet\Install-Package Octokit.Webhooks -Version 4.0.3
<PackageReference Include="Octokit.Webhooks" Version="4.0.3" />
<PackageVersion Include="Octokit.Webhooks" Version="4.0.3" />Directory.Packages.props
<PackageReference Include="Octokit.Webhooks" />Project file
paket add Octokit.Webhooks --version 4.0.3
#r "nuget: Octokit.Webhooks, 4.0.3"
#:package Octokit.Webhooks@4.0.3
#addin nuget:?package=Octokit.Webhooks&version=4.0.3Install as a Cake Addin
#tool nuget:?package=Octokit.Webhooks&version=4.0.3Install as a Cake Tool
👁 GitHub Workflow Status
👁 Octokit.Webhooks NuGet Package Version
👁 Octokit.Webhooks NuGet Package Downloads
👁 OpenSSF Scorecard
Libraries to handle GitHub Webhooks in .NET applications.
dotnet add package Octokit.Webhooks.AspNetCore
Create a class that derives from WebhookEventProcessor and 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.NOTE: Support is only provided for isolated process Azure Functions.
dotnet add package Octokit.Webhooks.AzureFunctions
Create a class that derives from WebhookEventProcessor and 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 and 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.
All packages in this repository are licensed under the MIT license.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
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 |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.3 | 3,043 | 6/4/2026 |
| 4.0.2 | 3,513 | 5/26/2026 |
| 4.0.1 | 8,287 | 5/12/2026 |
| 4.0.0 | 9,893 | 4/14/2026 |
| 4.0.0-rc.2 | 145 | 4/14/2026 |
| 4.0.0-rc.1 | 154 | 4/14/2026 |
| 3.2.1 | 82,980 | 9/11/2025 |
| 3.1.0 | 5,451 | 9/2/2025 |
| 3.0.0 | 75,268 | 7/18/2025 |
| 2.5.1 | 20,852 | 6/26/2025 |
| 2.5.0 | 383 | 6/26/2025 |
| 2.4.1 | 65,524 | 10/22/2024 |
| 2.4.0 | 6,917 | 10/9/2024 |
| 2.3.0 | 1,973 | 10/2/2024 |
| 2.2.3 | 16,582 | 7/31/2024 |
| 2.2.2 | 8,727 | 6/27/2024 |
| 2.2.1 | 8,877 | 5/9/2024 |
| 2.2.0 | 1,013 | 5/6/2024 |
| 2.1.1 | 9,841 | 2/29/2024 |
| 2.1.0 | 8,235 | 12/19/2023 |