Global

Members

Application

The app parameter available to apps

Properties:
Name Type Description
log logger

A logger

Source:

Context

Helpers for extracting information from the webhook event, which can be passed to GitHub API calls.

Properties:
Name Type Description
github github

A GitHub API client

payload payload

The webhook event payload

log logger

A logger

Source:

Methods

get()

Returns a boolean if the actor on the event was a bot.

Source:

Type Definitions

logger

A logger backed by bunyan

The default log level is info, but you can change it by setting the LOG_LEVEL environment variable to trace, debug, info, warn, error, or fatal.

By default, logs are formatted for readability in development. If you intend to drain logs to a logging service, set LOG_FORMAT=json.

Note: All execptions reported with logger.error will be forwarded to sentry if the SENTRY_DSN environment variable is set.

Source:
Example
app.log("This is an info message");
app.log.debug("…so is this");
app.log.trace("Now we're talking");
app.log.info("I thought you should know…");
app.log.warn("Woah there");
app.log.error("ETOOMANYLOGS");
app.log.fatal("Goodbye, cruel world!");

payload

Source: