Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

ApplicationFunction

ApplicationFunction: (app: Application) => void

Type declaration

Graphql

Graphql: (query: string, variables?: Variables, headers?: Headers) => ReturnType<typeof graphql>

Type declaration

    • (query: string, variables?: Variables, headers?: Headers): ReturnType<typeof graphql>
    • Parameters

      Returns ReturnType<typeof graphql>

MergeOptions

MergeOptions: merge.Options

OnCallback

OnCallback<T>: (context: Context<T>) => Promise<void>

Type parameters

  • T

Type declaration

    • (context: Context<T>): Promise<void>
    • Parameters

      Returns Promise<void>

Resolver

Resolver: (appFnId: string, opts: { basedir: string }) => string

Type declaration

    • (appFnId: string, opts: { basedir: string }): string
    • Parameters

      • appFnId: string
      • opts: { basedir: string }
        • basedir: string

      Returns string

Variables

Const BASE_KEY

BASE_KEY: "_extends" = "_extends"

Const BASE_REGEX

BASE_REGEX: RegExp = new RegExp('^' +'(?:([a-z\\d](?:[a-z\\d]|-(?=[a-z\\d])){0,38})/)?' + // org'([-_.\\w\\d]+)' + // project'(?::([-_./\\w\\d]+\\.ya?ml))?' + // filename'$','i')

Const CONFIG_PATH

CONFIG_PATH: ".github" = ".github"

Const DEFAULT_BASE

DEFAULT_BASE: ".github" = ".github"

Const ProbotOctokit

ProbotOctokit: Static = Octokit.plugin([throttling, retry, enterpriseCompatibility])

Let appMeta

appMeta: ReturnType<GitHubAPI["apps"]["getAuthenticated"]> | null = null

Const cache

cache: Cache = createDefaultCache()

Const defaultAppFns

defaultAppFns: ApplicationFunction[] = [require('./apps/default'),require('./apps/sentry'),require('./apps/stats')]

Const defaultOptions

defaultOptions: ResolveOptions

Let didFailRetrievingAppMeta

didFailRetrievingAppMeta: boolean = false

Const domain

domain: string = process.env.PROJECT_DOMAIN || `http://localhost:${process.env.PORT || 3000}`

Const hint

hint: "please use:* `--private-key=/path/to/private-key` flag, or* `PRIVATE_KEY` environment variable, or* `PRIVATE_KEY_PATH` environment variable" = `please use:* \`--private-key=/path/to/private-key\` flag, or* \`PRIVATE_KEY\` environment variable, or* \`PRIVATE_KEY_PATH\` environment variable`

Const isBase64

isBase64: any = require('is-base64')

Const logger

logger: Logger = new Logger({level: toBunyanLogLevel(process.env.LOG_LEVEL || 'info'),name: 'probot',serializers,stream: new bunyanFormat({color: supportsColor.stdout,levelInString: !!process.env.LOG_LEVEL_IN_STRING,outputMode: toBunyanFormat(process.env.LOG_FORMAT || 'short')})})

Const octokitGetNextPage

octokitGetNextPage: any = require('octokit-pagination-methods/lib/get-next-page')

Const octokitHasNextPage

octokitHasNextPage: any = require('octokit-pagination-methods/lib/has-next-page')

Const welcomeMessage

welcomeMessage: string = `\nWelcome to Probot! Go to ${domain} to get started.\n`

Functions

GitHubAPI

addGraphQL

addLogging

  • addLogging(client: GitHubAPI, logger: Logger): void

addPagination

  • addPagination(octokit: Octokit): void

clearCache

  • clearCache(): void

createDefaultCache

  • createDefaultCache(): Cache

Const createProbot

  • createProbot(options: Options): Probot

Const createServer

Const createWebhookProxy

Const defaultCallback

  • defaultCallback(response: Octokit.AnyResponse, done: () => void): Response<any>

inTestEnvironment

  • inTestEnvironment(): boolean
  • 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 boolean

    Returns true if Probot is in a test environment.

isSubscribedToEvent

  • isSubscribedToEvent(app: Application, baseEventName: string): Promise<undefined | false | true>
  • Parameters

    • app: Application
    • baseEventName: string

      The base event name refers to the part before the first period mark (e.g. the issues part in issues.opened).

    Returns Promise<undefined | false | true>

    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.

isUnauthenticatedEvent

  • isUnauthenticatedEvent(event: WebhookEvent<any>): boolean

isWebhookEventCheckEnabled

  • isWebhookEventCheckEnabled(): boolean

Const logRequest

  • logRequest(__namedParameters: { logger: any }): express.RequestHandler

Const logRequestErrors

paginate

  • paginate(octokit: Octokit, octokitPaginate: Paginate, ...args: any[]): Promise<any[]>

Const resolve

retrieveAppMeta

toBunyanFormat

  • toBunyanFormat(format: string): "short" | "long" | "simple" | "json" | "bunyan"
  • Parameters

    • format: string

    Returns "short" | "long" | "simple" | "json" | "bunyan"

toBunyanLogLevel

  • toBunyanLogLevel(level: string): "error" | "trace" | "debug" | "info" | "warn" | "fatal"
  • Parameters

    • level: string

    Returns "error" | "trace" | "debug" | "info" | "warn" | "fatal"

webhookEventCheck

  • webhookEventCheck(app: Application, eventName: string): Promise<undefined | false | true>
  • Check if an application is subscribed to an event.

    Parameters

    Returns Promise<undefined | false | true>

    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.

Const wrapLogger

Object literals

Const serializers

serializers: object

err

err: (input: any) => any = bunyan.stdSerializers.err

Type declaration

    • (input: any): any
    • Parameters

      • input: any

      Returns any

req

req: (input: any) => any = bunyan.stdSerializers.req

Type declaration

    • (input: any): any
    • Parameters

      • input: any

      Returns any

event

  • event(event: WebhookEvent<any> | any): any

installation

repository

  • repository(repository: PayloadRepository): string

res

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Static method

Generated using TypeDoc