Skip to content

Commit 398a6fd

Browse files
committed
fix: normalize repo URL in parse_task (add github.com prefix)
1 parent 7162a39 commit 398a6fd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/task/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,14 @@ pub fn parse_task(task_dir: &Path) -> Result<SweForgeTask> {
277277
let mut workspace: WorkspaceConfig =
278278
serde_yaml::from_str(&workspace_content).context("Invalid workspace.yaml")?;
279279

280+
// Normalize repo URL (e.g. "owner/repo" -> "https://github.com/owner/repo")
281+
if !workspace.repo.starts_with("http://")
282+
&& !workspace.repo.starts_with("https://")
283+
&& !workspace.repo.starts_with("git@")
284+
{
285+
workspace.repo = format!("https://github.com/{}", workspace.repo);
286+
}
287+
280288
let prompt_path = task_dir.join("prompt.md");
281289
let prompt = std::fs::read_to_string(&prompt_path).context("Missing prompt.md")?;
282290

0 commit comments

Comments
 (0)