Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

release-app fix use case where sideload fails on custom branch with slashes

Louis Beaumont433d3670956b
diff --git a/screenpipe-app-tauri/src-tauri/Cargo.toml b/screenpipe-app-tauri/src-tauri/Cargo.toml
index 7e9812e26..d6da2cd2c 100644
--- a/screenpipe-app-tauri/src-tauri/Cargo.toml
+++ b/screenpipe-app-tauri/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "screenpipe-app"
-version = "0.37.4"
+version = "0.37.5"
description = ""
authors = ["you"]
license = ""
diff --git a/screenpipe-core/src/pipes.rs b/screenpipe-core/src/pipes.rs
index e569904d7..11ed740b7 100644
--- a/screenpipe-core/src/pipes.rs
+++ b/screenpipe-core/src/pipes.rs
@@ -1132,13 +1132,18 @@ fn get_raw_github_url(url: &str) -> anyhow::Result<String> {
let parsed_url = Url::parse(url)?;
if parsed_url.host_str() == Some("github.com") {
let path_segments: Vec<&str> = parsed_url.path_segments().unwrap().collect();
- if path_segments.len() >= 5 && path_segments[2] == "tree" {
- let (owner, repo, _, branch) = (
- path_segments[0],
- path_segments[1],
- path_segments[2],
- path_segments[3],
- );
+ if path_segments.len() >= 5 && path_segments.contains(&"tree") {
+ // Find the position of "tree" in the path
+ let tree_pos = path_segments.iter().position(|&s| s == "tree").unwrap();
+
+ let owner = path_segments[0];
+ let repo = path_segments[1];
+
+ // Everything after "tree" until the next major section is the branch
+ // Join with "/" to handle branches with slashes like "feature/branch-name"
+ let branch_end = path_segments.len();
+ let branch = path_segments[(tree_pos + 1)..branch_end].join("/");
+
let raw_url = format!(
"https://api.github.com/repos/{}/{}/git/trees/{}?recursive=1",
owner, repo, branch