MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / github_push_to_fork

Function github_push_to_fork

crates/opencode-cli/src/main.rs:4984–4993  ·  view source on GitHub ↗
(pr: &GithubPrRuntimeInfo)

Source from the content-addressed store, hash-verified

4982}
4983
4984fn github_push_to_fork(pr: &GithubPrRuntimeInfo) -> anyhow::Result<()> {
4985 let remote_name = "fork";
4986 let remote_url = format!("https://github.com/{}.git", pr.head_repo_full_name);
4987 if git_run(&["remote", "get-url", remote_name]).is_ok() {
4988 git_run(&["remote", "set-url", remote_name, &remote_url])?;
4989 } else {
4990 git_run(&["remote", "add", remote_name, &remote_url])?;
4991 }
4992 git_run(&["push", remote_name, &format!("HEAD:{}", pr.head_ref)])
4993}
4994
4995fn github_summary_title(response: &str, fallback: &str) -> String {
4996 let first = response

Callers 1

handle_github_commandFunction · 0.85

Calls 1

git_runFunction · 0.85

Tested by

no test coverage detected