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

    Function getGitHubToken

    • Retrieves a GitHub authentication token, checking sources in priority order.

      Checks GITHUB_TOKEN environment variable first, then falls back to gh auth token from the GitHub CLI. The result is cached after the first successful lookup (or first failed attempt), so subsequent calls are instant and do not spawn subprocesses.

      Returns string | null

      The GitHub token string, or null if no token is available

      const token = getGitHubToken();
      if (token) {
      // use token for API calls
      }