Skip to main content

normalize_repo_id

Function normalize_repo_id 

Source
pub fn normalize_repo_id(remote_url: &str) -> String
Expand description

Normalize a git remote URL into a stable repo_id. SCP-form and HTTPS-form URLs for the same repo collapse to one id:

use agentstatedeveloper_core::cross_service::normalize_repo_id;
assert_eq!(normalize_repo_id("git@github.com:Org/Repo.git"), "github.com/org/repo");
assert_eq!(normalize_repo_id("https://github.com/Org/Repo.git"), "github.com/org/repo");