Azure / Azure/azure-functions-host

C# - How to Register Webhook Handlers with Built-in Receivers

Open
#1,220 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 10h
Merged PRs (30d)
36

Description

Azure functions webhooks are built upon the "Webhook Receivers" of .NET Core: https://docs.microsoft.com/en-us/aspnet/webhooks/receiving/receivers

One of the key components of the receivers is the ability to register a chain of handlers to be automatically processed in an order of priority: https://docs.microsoft.com/en-us/aspnet/webhooks/receiving/handlers

This is "key" because the central challenge of webhooks is distinguishing between many possible types of webhooks and specifying different handling. "Webhooks Handlers" is tailored to solve this problem fairly elegantly, rather than writing lengthy JSON parsing code with complicated switching logic within the run.csx itself.

We already have a good way of getting shared assemblies with all our various github webhook handlers onto the function app server and loaded in our functions at runtime. We just need to know how we can subscribe our handlers to the appropriate "receiver" (ours case being for the github receiver) within an Azure function.

Contributor guide

Open the contributing guide

Research direction

Start with the linked .NET Core Webhook Receivers and Handlers documentation, then inspect how the Azure Function's run.csx loads shared assemblies. Determine whether handlers can be registered with the GitHub receiver inside an Azure Function and document the supported setup or limitation. Done means the registration path is clear for the reported GitHub webhook scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
backend, cloud
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.