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

    Function parseGitHubUrl

    • Parses a GitHub pull request or issue URL into its components.

      Only accepts HTTPS GitHub URLs (https://github.com/...). Returns null for invalid URLs, non-GitHub URLs, or URLs with invalid owner/repo characters.

      Parameters

      • url: string

        Full GitHub URL (e.g., "https://github.com/owner/repo/pull/42")

      Returns ParsedGitHubUrl | null

      Parsed URL components, or null if the URL is invalid or not a recognized GitHub PR/issue URL

      parseGitHubUrl('https://github.com/facebook/react/pull/123')
      // { owner: "facebook", repo: "react", number: 123, type: "pull" }
      parseGitHubUrl('https://github.com/vercel/next.js/issues/456')
      // { owner: "vercel", repo: "next.js", number: 456, type: "issues" }
      parseGitHubUrl('https://example.com/not-github')
      // null