A helper function used in testing that resets the cached result of /app.
Detects if Probot is likely running in a test environment.
Note: This method only detects Jest
environments or when NODE_ENV starts with test
.
Returns true
if Probot is in a test environment.
The base event name refers to the part before the first
period mark (e.g. the issues
part in
issues.opened
).
Returns false
when the application is not
subscribed to a webhook event. Otherwise, returns
true
. Returns undefined
if Probot
failed to retrieve GitHub App metadata.
Note: Probot will only check against a list
of events known to be in the GET /app
response.
Therefore, only the false
value should be
considered truthy.
Check if an application is subscribed to an event.
Returns false
if the app is not subscribed to an
event. Otherwise, returns true
. Returns
undefined
if the webhook-event-check feature is
disabled or if Probot failed to retrieve the GitHub App's
metadata.
Generated using TypeDoc
the @octokit/rest Node.js module, which wraps the GitHub API and allows you to do almost anything programmatically that you can do through a web browser.
https://github.com/octokit/rest.js