{"record":{"id":"756b00316e4265ce","repo":"nikivdev/code","slug":"no-upstream-configured-and-no-origin-pr-candidat","errorCode":null,"errorMessage":"No upstream configured and no origin/pr/* candidate found. Set upstream to your PR branch first, then re-run.","messagePattern":"No upstream configured and no origin/pr/\\* candidate found\\. Set upstream to your PR branch first, then re-run\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/commit.rs","lineNumber":8062,"sourceCode":"            }\n        }\n        return Ok(());\n    }\n\n    if force {\n        return Ok(());\n    }\n\n    if let Some(candidate) = find_best_pr_upstream_candidate(repo_root, head_sha) {\n        println!(\n            \"No upstream configured. Using {} as push upstream.\",\n            candidate\n        );\n        git_run_in(repo_root, &[\"branch\", \"--set-upstream-to\", &candidate])?;\n        return Ok(());\n    }\n\n    bail!(\n        \"No upstream configured and no origin/pr/* candidate found. Set upstream to your PR branch first, then re-run.\"\n    );\n}\n\npub fn commit_queue_has_entries(repo_root: &Path) -> bool {\n    let dir = commit_queue_dir(repo_root);\n    if !dir.exists() {\n        return false;\n    }\n    fs::read_dir(dir)\n        .map(|entries| {\n            entries\n                .filter_map(|entry| entry.ok())\n                .any(|entry| entry.path().extension().and_then(|s| s.to_str()) == Some(\"json\"))\n        })\n        .unwrap_or(false)\n}\n","sourceCodeStart":8044,"sourceCodeEnd":8080,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/commit.rs#L8044-L8080","documentation":"Error \"No upstream configured and no origin/pr/* candidate found. Set upstream to your PR branch first, then re-run.\" thrown in nikivdev/code.","triggerScenarios":"Thrown at src/commit.rs:8062 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}