{"record":{"id":"d730e1207e28ebd5","repo":"nikivdev/code","slug":"github-url-is-empty","errorCode":null,"errorMessage":"GitHub URL is empty","messagePattern":"GitHub URL is empty","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/publish.rs","lineNumber":22,"sourceCode":"use std::io::{self, IsTerminal, Write};\nuse std::path::{Path, PathBuf};\nuse std::process::Command;\nuse std::time::Duration;\n\nuse anyhow::{Context, Result, bail};\nuse crossterm::event::{self, Event as CEvent, KeyCode};\nuse crossterm::terminal::{disable_raw_mode, enable_raw_mode};\nuse reqwest::blocking::Client;\nuse serde::Serialize;\n\nuse crate::cli::{PublishAction, PublishCommand, PublishOpts};\nuse crate::config;\nuse crate::vcs;\n\nfn parse_github_repo(url: &str) -> Result<(String, String, String)> {\n    let trimmed = url.trim().trim_end_matches('/');\n    if trimmed.is_empty() {\n        bail!(\"GitHub URL is empty\");\n    }\n\n    if let Some(rest) = trimmed.strip_prefix(\"git@github.com:\") {\n        let rest = rest.trim_end_matches(\".git\");\n        let Some((owner, repo)) = rest.split_once('/') else {\n            bail!(\"Invalid GitHub SSH URL: {}\", url);\n        };\n        return Ok((\n            owner.to_string(),\n            repo.to_string(),\n            format!(\"git@github.com:{}/{}.git\", owner, repo),\n        ));\n    }\n\n    if let Some(rest) = trimmed.strip_prefix(\"https://github.com/\") {\n        let rest = rest.trim_end_matches(\".git\");\n        let Some((owner, repo)) = rest.split_once('/') else {\n            bail!(\"Invalid GitHub HTTPS URL: {}\", url);","sourceCodeStart":4,"sourceCodeEnd":40,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/publish.rs#L4-L40","documentation":"Error \"GitHub URL is empty\" thrown in nikivdev/code.","triggerScenarios":"Thrown at src/publish.rs:22 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}