@oss-autopilot/core - v1.6.3
    Preparing search index...

    Function getOctokit

    • Get a shared, throttled Octokit instance for the given token. Returns a cached instance if the token matches, otherwise creates a new one.

      The client retries on primary rate limits (up to 2 retries) and secondary rate limits (up to 3 retries).

      Parameters

      • token: string

        GitHub personal access token

      Returns Octokit & RestEndpointMethods & Api & {}

      Authenticated Octokit instance with rate limit throttling

      import { getOctokit, requireGitHubToken } from '@oss-autopilot/core';

      const octokit = getOctokit(requireGitHubToken());
      const { data } = await octokit.repos.get({ owner: 'facebook', repo: 'react' });