An Azure Function for pushing GitHub webhook events to IRC
Go to file
R Tyler Croy 5ac3eed54c Render the source blocks as shell code 2020-01-12 13:32:25 -08:00
.vscode Add initial version of the irc-push Azure Function 2020-01-12 13:22:06 -08:00
src Add initial version of the irc-push Azure Function 2020-01-12 13:22:06 -08:00
.dockerignore Add initial version of the irc-push Azure Function 2020-01-12 13:22:06 -08:00
.gitignore Add initial version of the irc-push Azure Function 2020-01-12 13:22:06 -08:00
Cargo.toml Add initial version of the irc-push Azure Function 2020-01-12 13:22:06 -08:00
Dockerfile Add initial version of the irc-push Azure Function 2020-01-12 13:22:06 -08:00
README.adoc Render the source blocks as shell code 2020-01-12 13:32:25 -08:00
events.push.json Add initial version of the irc-push Azure Function 2020-01-12 13:22:06 -08:00
host.json Add initial version of the irc-push Azure Function 2020-01-12 13:22:06 -08:00
local.settings.json Add initial version of the irc-push Azure Function 2020-01-12 13:22:06 -08:00

README.adoc

<html lang="en"> <head> </head>

IRC push function

This is an Azure Function which implements a simple dispatch of push events into a pre-defined IRC channel.

Development

Running the unit test(s) can be done with: cargo test

Local invocations

Running locally will first require the prerequisites for the azure-functions-rs crate to be installed, which is described in this document.

Once the prerequisites have been met, hosting the function locally requires an invocation of the new cargo func command: cargo func run --port 8100

Sending test data
curl -XPOST --data @events.push.json http://localhost:8100/api/webhook

Deployment

The following is an example of the deployment to an Azure Container Registry configured by rtyler.

If you wish to deploy this yourself, you will need to configure an Azure Functions App (Classic) and your own registry.

docker build -t functionsbrokencode.azurecr.io/irc-push . && docker push functionsbrokencode.azurecr.io/irc-push
</html>