parse_github_url_from_git_remote_url

Function parse_github_url_from_git_remote_url 

Source
pub(crate) fn parse_github_url_from_git_remote_url(
    git_remote_url: &str,
) -> Result<Url>
Expand description

Converts a Git remote URL (SSH or HTTPS) to a canonical GitHub HTTPS URL without the .git suffix.

Accepts formats like:

  • git@github.com:owner/repo.git
  • https://github.com/owner/repo[.git]

ยงErrors

  • The URL cannot be parsed or lacks a path component.