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.
https://github.com/...
null
parseGitHubUrl('https://github.com/facebook/react/pull/123')// { owner: "facebook", repo: "react", number: 123, type: "pull" } Copy
parseGitHubUrl('https://github.com/facebook/react/pull/123')// { owner: "facebook", repo: "react", number: 123, type: "pull" }
parseGitHubUrl('https://example.com/not-github')// null Copy
parseGitHubUrl('https://example.com/not-github')// null
Parses a GitHub pull request or issue URL into its components.
Only accepts HTTPS GitHub URLs (
https://github.com/...). Returnsnullfor invalid URLs, non-GitHub URLs, or URLs with invalid owner/repo characters.