Octokit.Webhooks.AspNetCore
3.2.1
Prefix Reserved
dotnet add package Octokit.Webhooks.AspNetCore --version 3.2.1
NuGet\Install-Package Octokit.Webhooks.AspNetCore -Version 3.2.1
<PackageReference Include="Octokit.Webhooks.AspNetCore" Version="3.2.1" />
<PackageVersion Include="Octokit.Webhooks.AspNetCore" Version="3.2.1" />
<PackageReference Include="Octokit.Webhooks.AspNetCore" />
paket add Octokit.Webhooks.AspNetCore --version 3.2.1
#r "nuget: Octokit.Webhooks.AspNetCore, 3.2.1"
#:package Octokit.Webhooks.AspNetCore@3.2.1
#addin nuget:?package=Octokit.Webhooks.AspNetCore&version=3.2.1
#tool nuget:?package=Octokit.Webhooks.AspNetCore&version=3.2.1
Octokit.Webhooks
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
WebhookEventProcessor:.ConfigureServices(collection => { ... collection.AddSingleton<WebhookEventProcessor, MyWebhookEventProcessor>(); ... })Configure the webhook function:
new HostBuilder() ... .ConfigureGitHubWebhooks() ... .Build();
ConfigureGitHubWebhooks() either takes an optional parameter:
secret. The secret you have configured in GitHub, if you have set this up.
or:
configure. A function that takes an IConfiguration instance and expects the secret you have configured in GitHub in return.
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
- Octokit.Webhooks (>= 3.2.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Octokit.Webhooks.AspNetCore:
| Package | Downloads |
|---|---|
|
MintPlayer.SlingBot
Build a Github Bot |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Octokit.Webhooks.AspNetCore:
| Repository | Stars |
|---|---|
|
microsoft/project-oagents
Experimental AI Agents Framework
|
| Version | Downloads | Last Updated |
|---|---|---|
| 3.2.1 | 10,862 | 9/11/2025 |
| 3.1.0 | 2,734 | 9/2/2025 |
| 3.0.0 | 6,811 | 7/18/2025 |
| 2.5.1 | 10,807 | 6/26/2025 |
| 2.5.0 | 447 | 6/26/2025 |
| 2.4.1 | 48,875 | 10/22/2024 |
| 2.4.0 | 6,178 | 10/9/2024 |
| 2.3.0 | 1,547 | 10/2/2024 |
| 2.2.3 | 10,116 | 7/31/2024 |
| 2.2.2 | 6,362 | 6/27/2024 |
| 2.2.1 | 7,515 | 5/9/2024 |
| 2.2.0 | 712 | 5/6/2024 |
| 2.1.1 | 8,323 | 2/29/2024 |
| 2.1.0 | 6,401 | 12/19/2023 |
| 2.0.6 | 6,117 | 11/12/2023 |
| 2.0.5 | 2,042 | 10/26/2023 |
| 2.0.4 | 1,652 | 10/12/2023 |
| 2.0.3 | 7,297 | 8/25/2023 |
| 2.0.2 | 3,523 | 8/16/2023 |
| 2.0.1 | 2,658 | 6/13/2023 |
| 2.0.0 | 604 | 6/9/2023 |
| 1.5.2 | 3,293 | 6/1/2023 |
| 1.5.1 | 1,554 | 4/27/2023 |
| 1.5.0 | 427 | 4/25/2023 |
| 1.4.1 | 716 | 4/11/2023 |
| 1.4.0 | 245 | 4/6/2023 |
| 1.3.5 | 14,264 | 10/13/2022 |
| 1.3.4 | 359 | 10/5/2022 |
| 1.3.3 | 8,507 | 8/11/2022 |
| 1.3.2 | 243 | 8/9/2022 |
| 1.3.1 | 1,030 | 7/20/2022 |
| 1.3.0 | 208 | 7/19/2022 |
| 1.2.1 | 3,836 | 7/7/2022 |
| 1.2.0 | 230 | 7/7/2022 |
| 1.1.1 | 819 | 6/27/2022 |
| 1.1.0 | 399 | 6/13/2022 |
| 1.0.0 | 1,678 | 5/13/2022 |
| 0.6.5 | 593 | 4/27/2022 |
| 0.6.4 | 380 | 4/13/2022 |
| 0.6.3 | 2,206 | 3/31/2022 |
| 0.6.2 | 318 | 3/26/2022 |
| 0.6.1 | 256 | 3/25/2022 |
| 0.6.0 | 299 | 2/2/2022 |
| 0.5.0 | 776 | 1/24/2022 |
| 0.4.0 | 577 | 1/13/2022 |
| 0.3.0 | 6,039 | 11/23/2021 |
| 0.2.0 | 245 | 10/29/2021 |
| 0.1.2 | 311 | 9/27/2021 |
| 0.1.1 | 726 | 9/21/2021 |