probot
    Preparing search index...
    • 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.

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

      Parameters

      • options: { installationId?: number; log: Logger; octokit: Octokit & {} & {} & Api & API }

        Options for the authenticated client, including the octokit instance and a logger.

        • OptionalinstallationId?: number

          ID of the installation, which can be extracted from context.payload.installation.id. If called without this parameter, the client wil authenticate as the app instead of as a specific installation, which means it can only be used for app APIs.

        • log: Logger

          A logger instance, typically created with getLog().

        • octokit: Octokit & {} & {} & Api & API

          The Octokit instance to use for authentication.

      Returns Promise<Octokit & {} & {} & Api & API>

      An authenticated GitHub API client