Options
All
  • Public
  • Public/Protected
  • All
Menu

Module auth

Index

Functions

Functions

auth

  • auth(state: State, installationId?: number, log?: Logger): Promise<InstanceType<typeof ProbotOctokit>>
  • Authenticate and get a GitHub client that can be used to make API calls.

    You'll probably want to use context.octokit instead.

    Note: app.auth is asynchronous, so it needs to be prefixed with a await to wait for the magic to happen.

     module.exports = (app) => {
    app.on('issues.opened', async context => {
    const octokit = await app.auth();
    });
    };

    Parameters

    • state: State
    • Optional installationId: number
    • Optional log: Logger

    Returns Promise<InstanceType<typeof ProbotOctokit>>

    An authenticated GitHub API client

Generated using TypeDoc