Skip to main content

validate_owner_repo

Function validate_owner_repo 

Source
pub fn validate_owner_repo(name: &str) -> Result<()>
Expand description

Validates that name is a valid owner/repo GitHub identifier before it reaches a {api_base}/repos/{name}/... fetch as a bare path segment.

The charset regex alone allows ., so a repo half of exactly .. would otherwise retarget the request one path segment up ({api_base}/repos/{owner}/../releases -> {api_base}/repos/releases, #357) — is_valid_github_identity closes that gap via is_dot_segment.

§Errors

Returns DepsError::InvalidUri when name is not a valid owner/repo identifier.