Skip to content
This repository has been archived by the owner on Jun 3, 2022. It is now read-only.

ethomson/probot-serverless-azurefunctions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Azure Functions Extension for Probot

This tool is deprecated. Please use Probot's adapter-azure-functions.

Usage

A Probot extension to make it easier to run your Probot Apps in Azure Functions.

$ npm install probot-serverless-azurefunctions
// index.js
const { serverless } = require('probot-serverless-azurefunctions')

const appFn = (app) => {
	app.on(['*'], async (context) => {
		app.log(`Received event: ${context.event}`)
	})
}

module.exports.probot = serverless(appFn)

Configuration

This package moves the functionality of probot run into a handler suitable for usage in Azure Functions. Follow the documentation on Environment Configuration to setup your app's environment variables. You can add these to .env, but for security reasons you may want to use the Azure CLI or the user-interface to set Environment Variables for the function so you don't have to include any secrets in the deployed package.

Differences from probot run

Local Development

Since Azure Functions do not start a normal node process, the best way we've found to test this out locally is to use the Azure Functions Core Tools or another local emulator on your local machine before deploying your function to Azure.

Long running tasks

Some Probot Apps that depend on long running processes or intervals will not work with this extension. This is due to the inherent architecture of serverless functions, which are designed to respond to events and stop running as quickly as possible. For longer running apps we recommend using other deployment options.

Only responds to Webhooks from GitHub

This extension is designed primarily for receiving webhooks from GitHub and responding back as a GitHub App.

About

Azure Functions adapter for Probot tools

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •