You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
println!("🔗 Open PR already exists for branch {}: {}", branch.branch_name.bold(), pr_url);
2275
+
}else{
2276
+
println!("🔗 Open PR already exists for branch {}", branch.branch_name.bold());
2277
+
}
2274
2278
continue;
2275
2279
}
2276
2280
}
@@ -2280,8 +2284,28 @@ impl GitChain {
2280
2284
}
2281
2285
}
2282
2286
2287
+
// Ensure the branch is pushed before creating a PR, because gh pr create --web drops into an interactive shell that this script doesn't handle correctly
2288
+
let push_output = Command::new("git")
2289
+
.arg("push")
2290
+
.arg("origin")
2291
+
.arg(&branch.branch_name)
2292
+
.output();
2293
+
2294
+
ifletErr(e) = push_output {
2295
+
eprintln!("Failed to push branch {}: {}", branch.branch_name.bold(), e);
2296
+
continue;
2297
+
}else{
2298
+
let unwrapped_push_output = push_output.unwrap();
2299
+
if !unwrapped_push_output.status.success(){
2300
+
eprintln!("Failed to push branch {}: {}", branch.branch_name.bold(),String::from_utf8_lossy(&unwrapped_push_output.stderr));
0 commit comments