Skip to main content

create_pr_if_needed

Function create_pr_if_needed 

Source
pub async fn create_pr_if_needed(
    dir: &Path,
    branch: &str,
    title: &str,
    summary: &str,
    accomplished: &[String],
    remaining: &[String],
    files: &[String],
    task_id: &str,
    agent: &str,
    model: Option<&str>,
    repo: &str,
    base_branch: &str,
) -> PrCreateResult<String>
Expand description

Create a PR if one doesn’t already exist.

Uses GhHttp exclusively for GitHub API operations. No gh CLI fallback is used, ensuring consistent behavior across environments.

§Returns

  • Ok(url) - PR URL (newly created or already existed)
  • Err(PrCreateError) - API error or other failure