pub fn prepare_pr_worktree(
repo: &Repository,
pr_number: u32,
pr_format: &str,
) -> Result<(String, String, String)>Expand description
Prepare everything needed to create a worktree for PR pr_number.
Orchestrates the complete PR workflow:
- Checks that
ghCLI is available - Fetches PR metadata via
gh - Sets up a fork remote if the PR is cross-repository
- Fetches the PR’s head branch
- Formats the worktree name using
pr_format
Returns (worktree_name, remote_ref, base_branch) ready for add_worktree.