github-release-webhook-to-bugsnag

0.1.0 • Public • Published

github-release-webhook-to-bugsnag travis npm

Notify Bugsnag of a new deployment when a new GitHub release is published.

Example

Designed for use with the excellent github-webhook-middleware.

npm install --save github-release-webhook-to-bugsnag github-webhook-middleware

Add a new route for your GitHub webhook that uses the middleware:

const app = require('express')();
 
...
 
const githubWebhook = require('github-webhook-middleware')({
  secret: process.env.REFRESH_SECRET
});
 
const notifyBugsnagOnRelease = require('github-release-webhook-to-bugsnag')({
  repo: process.env.GITHUB_REPO,
  token: process.env.GITHUB_TOKEN,
  bugsnag: process.env.BUGSNAG_NOTIFIER_KEY
});
 
app.post('/hooks/github', githubWebhook, notifyBugsnagOnRelease);
 
...

Configuration

  • repo :username/:repo path on GitHub. Uses the GITHUB_REPO environment variable if unspecified.
  • token GitHub access token. Uses the GITHUB_TOKEN environment variable if unspecified.
  • bugsnag Bugsnag notifier token. Uses the BUGSNAG_NOTIFIER_KEY environment variable if unspecified.
  • githubEndpoint For GitHub enterprise users. Uses the GITHUB_ENDPOINT environment variable if unspecified. Defaults to https://api.github.com.
  • bugsnagEndpoint For Bugsnag enterprise users. Uses the BUGSNAG_ENDPOINT environment variable if unspecified. Defaults to https://notify.bugsnag.com/deploy.

License

Apache 2.0

Readme

Keywords

none

Package Sidebar

Install

npm i github-release-webhook-to-bugsnag

Weekly Downloads

1

Version

0.1.0

License

Apache-2.0

Last publish

Collaborators

  • orechova
  • himanshusinghs
  • c-buckingham
  • mongo-j
  • mabaasit
  • alexander_schroll
  • chuck.kalmanek
  • mongodb-js-user
  • rueckstiess
  • durran
  • lerouxb
  • fredtruman
  • mbroadst
  • hswolff
  • satyasinha
  • matt_d_rat
  • rhysm
  • tomhollander
  • alena.khineika
  • jeff-allen-mongo
  • mmarcon
  • jonathan.balsano
  • mongodb-build
  • jack.weir
  • stennie
  • mcasimir
  • kristina.stefano
  • jarjee
  • shaketbaby
  • devtoolsbot
  • addaleax
  • gribnoysup
  • mutukrish
  • imlucas