github-release-webhook-to-bugsnag
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 = ; ... const githubWebhook = secret: processenvREFRESH_SECRET; const notifyBugsnagOnRelease = repo: processenvGITHUB_REPO token: processenvGITHUB_TOKEN bugsnag: processenvBUGSNAG_NOTIFIER_KEY; app; ...
Configuration
- repo
:username/:repo
path on GitHub. Uses theGITHUB_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 tohttps://api.github.com
. - bugsnagEndpoint For Bugsnag enterprise users. Uses the
BUGSNAG_ENDPOINT
environment variable if unspecified. Defaults tohttps://notify.bugsnag.com/deploy
.
License
Apache 2.0