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

Function github_checkout_pr_branch

crates/opencode-cli/src/main.rs:4929–4938  ·  view source on GitHub ↗
(
    owner: &str,
    repo: &str,
    pr_number: u64,
    token: Option<&str>,
)

Source from the content-addressed store, hash-verified

4927}
4928
4929fn github_checkout_pr_branch(
4930 owner: &str,
4931 repo: &str,
4932 pr_number: u64,
4933 token: Option<&str>,
4934) -> anyhow::Result<()> {
4935 let repo_name = format!("{}/{}", owner, repo);
4936 let pr = pr_number.to_string();
4937 gh_run(&["pr", "checkout", &pr, "--repo", &repo_name], token)
4938}
4939
4940fn github_detect_dirty(original_head: &str) -> anyhow::Result<(bool, bool)> {
4941 let status = git_output(&["status", "--porcelain"])?;

Callers 1

handle_github_commandFunction · 0.85

Calls 1

gh_runFunction · 0.85

Tested by

no test coverage detected