Type aliases
AdditionalOptions
AdditionalOptions: { env: Record<string, string | undefined> }
Type declaration
-
env: Record<string, string | undefined>
ApplicationFunctionOptions
AppsGetAuthenticatedResponse
AppsGetAuthenticatedResponse: Endpoints["GET /app"]["response"]["data"]
Constructor
Constructor<T>: {}
Type parameters
CreateProbotOptions
Create
ProbotOptions: { defaults?: Options; env?: NodeJS.ProcessEnv; overrides?: Options }
Type declaration
-
Optional defaults?: Options
-
Optional env?: NodeJS.ProcessEnv
-
Optional overrides?: Options
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
GetRouter
GetRouter: (path?: undefined | string) => express.Router
Type declaration
-
- (path?: undefined | string): express.Router
-
Parameters
-
Optional path: undefined | string
Returns express.Router
MergeOptions
MergeOptions: merge.Options
MiddlewareOptions
Middleware
Options: { Probot?: typeof Probot; probot: Probot }
Type declaration
-
[key: string]: unknown
-
Optional Probot?: typeof Probot
-
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 appId
appId: number | string
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; appId?: undefined | number; baseUrl?: undefined | string; cache?: LRUCache<number, string>; githubToken?: undefined | string; host?: undefined | string; log: Logger; octokit: InstanceType<typeof ProbotOctokit>; port?: undefined | number; privateKey?: undefined | string; webhookProxy?: undefined | string; webhooks: { path?: undefined | string; secret?: undefined | string } }
Type declaration
-
Octokit: typeof ProbotOctokit
-
Optional appId?: undefined | number
-
Optional baseUrl?: undefined | string
-
Optional cache?: LRUCache<number, string>
-
Optional githubToken?: undefined | string
-
Optional host?: undefined | string
-
log: Logger
-
octokit: InstanceType<typeof ProbotOctokit>
-
Optional port?: undefined | number
-
Optional privateKey?: undefined | string
-
Optional webhookProxy?: undefined | string
-
webhooks: { path?: undefined | string; secret?: undefined | string }
-
Optional path?: undefined | string
-
Optional secret?: undefined | string
Variables
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 didDeprecateApp
didDeprecateApp: boolean = false
Let didDeprecateRouter
didDeprecateRouter: 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({appId: program.app,privateKey: String(privateKey),githubToken: githubToken,log,})
"Probot" option is deprecated. Pass a "probot" instance instead, see https://github.com/probot/probot/pull/1431