nikivdev/code · error

found PR url in queue entry but could not resolve PR number

Error message

found PR url in queue entry but could not resolve PR number

What it means

Error "found PR url in queue entry but could not resolve PR number" thrown in nikivdev/code.

Source

Thrown at src/commit.rs:11781

    let head = default_pr_head(&entry);
    let (number, url) = if let Some(url) = entry
        .pr_url
        .as_deref()
        .map(|s| s.trim())
        .filter(|s| !s.is_empty())
        .map(|s| s.to_string())
    {
        let n = entry
            .pr_number
            .or_else(|| pr_number_from_url(&url))
            .unwrap_or(0);
        if n > 0 {
            (n, url)
        } else if let Some((n, u)) = gh_find_open_pr_by_head(repo_root, &repo, &head)? {
            (n, u)
        } else {
            // If URL exists but we can't parse number or find by head, re-create is risky; just fail.
            bail!("found PR url in queue entry but could not resolve PR number");
        }
    } else if let Some((n, u)) = gh_find_open_pr_by_head(repo_root, &repo, &head)? {
        (n, u)
    } else {
        // Create it if missing (as draft).
        let gh_head = ensure_pr_head_pushed(repo_root, &head, &entry.commit_sha)?;
        let (title, body_rest) = commit_message_title_body(&entry.message);
        let (n, u) = if let Some(found) = gh_find_open_pr_by_head(repo_root, &repo, &gh_head)? {
            found
        } else {
            gh_create_pr(
                repo_root,
                &repo,
                &gh_head,
                &opts.base,
                &title,
                body_rest.trim(),
                true,

View on GitHub (pinned to a747e741ae)

When it happens

Trigger: Thrown at src/commit.rs:11781 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01). Data as JSON: /api/errors/c3b18ddbde8f0989. Report an issue: GitHub.