Type aliases
ApplicationFunctionOptions
Application
FunctionOptions: {} & { app: Probot; getRouter: (path?: undefined | string) => express.Router }
AppsGetAuthenticatedResponse
AppsGetAuthenticatedResponse: Endpoints["GET /app"]["response"]["data"]
DeprecatedKey
DeprecatedKey: "auth" | "load" | "log" | "on" | "receive" | "router"
DeprecatedLogger
DeprecatedLogger: LogFn & Logger
FactoryOptions
FactoryOptions: { octokit: InstanceType<typeof ProbotOctokit>; octokitOptions: ConstructorParameters<typeof ProbotOctokit> & { auth?: Record<string, unknown>; throttle?: Record<string, unknown> } }
Type declaration
-
[key: string]: unknown
-
octokit: InstanceType<typeof ProbotOctokit>
-
octokitOptions: ConstructorParameters<typeof ProbotOctokit> & { auth?: Record<string, unknown>; throttle?: Record<string, unknown> }
GetLogOptions
Get
LogOptions: { level?: LogLevel } & Options
MergeOptions
MergeOptions: merge.Options
OnCallback
On
Callback<T>: (context: Context<T>) => Promise<void>
Type parameters
Type declaration
-
- (context: Context<T>): Promise<void>
-
Parameters
Returns Promise<void>
Options
Options: { Octokit: typeof ProbotOctokit; appId?: undefined | number; baseUrl?: undefined | string; cache: LRUCache<number, string>; githubToken?: undefined | string; log: Logger; privateKey?: undefined | string; redisConfig?: Redis.RedisOptions | string; throttleOptions?: any }
Type declaration
-
Octokit: typeof ProbotOctokit
-
Optional appId?: undefined | number
-
Optional baseUrl?: undefined | string
-
cache: LRUCache<number, string>
-
Optional githubToken?: undefined | string
-
log: Logger
-
Optional privateKey?: undefined | string
-
Optional redisConfig?: Redis.RedisOptions | string
-
Optional throttleOptions?: any
Optional Octokit
Octokit: typeof ProbotOctokit
Optional baseUrl
baseUrl: undefined | string
Optional cache
cache: LRUCache<number, string>
Optional cert
cert: undefined | string
Optional githubToken
githubToken: undefined | string
Optional host
host: undefined | string
Optional id
id: undefined | number
Optional logLevel
logLevel: "trace" | "debug" | "info" | "warn" | "error" | "fatal"
Optional octokit
octokit: InstanceType<typeof ProbotOctokit>
Optional port
port: undefined | number
Optional privateKey
privateKey: undefined | string
Optional redisConfig
redisConfig: Redis.RedisOptions
Optional router
router: Router
Optional secret
secret: undefined | string
Optional throttleOptions
throttleOptions: any
Optional webhookPath
webhookPath: undefined | string
Optional webhookProxy
webhookProxy: undefined | string
Optional webhooks
webhooks: Webhooks
ProbotWebhooks
Probot
Webhooks: Webhooks<WebhookEvent, Omit<Context, keyof WebhookEvent>>
Resolver
Resolver: (appFnId: string, opts: { basedir: string }) => string
Type declaration
-
- (appFnId: string, opts: { basedir: string }): string
-
Parameters
-
appFnId: string
-
opts: { basedir: string }
Returns string
State
State: { Octokit: typeof ProbotOctokit; baseUrl?: undefined | string; cache?: LRUCache<number, string>; githubToken?: undefined | string; host?: undefined | string; id?: undefined | number; log: Logger; octokit: InstanceType<typeof ProbotOctokit>; port?: undefined | number; privateKey?: undefined | string; webhookPath?: undefined | string; webhookProxy?: undefined | string; webhooks: { path?: undefined | string; secret?: undefined | string } }
Type declaration
-
Octokit: typeof ProbotOctokit
-
Optional baseUrl?: undefined | string
-
Optional cache?: LRUCache<number, string>
-
Optional githubToken?: undefined | string
-
Optional host?: undefined | string
-
Optional id?: undefined | number
-
log: Logger
-
octokit: InstanceType<typeof ProbotOctokit>
-
Optional port?: undefined | number
-
Optional privateKey?: undefined | string
-
Optional webhookPath?: undefined | string
-
Optional webhookProxy?: undefined | string
-
webhooks: { path?: undefined | string; secret?: undefined | string }
-
Optional path?: undefined | string
-
Optional secret?: undefined | string
deprecatedKeys
deprecatedKeys: "router" | "log" | "on" | "receive" | "load" | "route" | "auth"
Variables
Const DEPRECATED_APP_KEYS
DEPRECATED_
APP_KEYS: DeprecatedKey[] = ["auth","load","log","on","receive","router",]
Const ProbotOctokit
ProbotOctokit: { constructor: any } & { constructor: any; plugins: any[] } & Octokit & {} = Octokit.plugin(throttling,retry,paginateRest,restEndpointMethods,enterpriseCompatibility,probotRequestLogging,config).defaults((instanceOptions: any) => {// merge throttle options deeplyconst options = Object.assign({}, defaultOptions, instanceOptions, {throttle: instanceOptions.throttle? Object.assign({}, defaultOptions.throttle, instanceOptions.throttle): defaultOptions.throttle,});return options;})
Const VERSION
VERSION: "0.0.0-development" = "0.0.0-development"
Let didDeprecate
didDeprecate: boolean = false
Let didFailRetrievingAppMeta
didFailRetrievingAppMeta: boolean = false
Const githubToken
githubToken: any = program.token
Const log
log: BaseLogger & {} = getLog({level: program.logLevel,logFormat: program.logFormat,logLevelInString: program.logLevelInString,sentryDsn: program.sentryDsn,})
Const payload
payload: any = require(path.resolve(program.payloadPath))
Const pkg
pkg: any = require("../../package")
Const privateKey
privateKey: null | string = getPrivateKey()
Const probot
probot
: Probot = new Probot({id: program.app,privateKey: String(privateKey),githubToken: githubToken,log,})
cert
options is deprecated. UseprivateKey
instead