{"record":{"id":"b2e23e8427fa826f","repo":"gitbutlerapp/gitbutler","slug":"updating-pull-requests-for-forge-forge-is-not","errorCode":null,"errorMessage":"Updating pull requests for forge {forge:?} is not implemented yet.","messagePattern":"Updating pull requests for forge (.+?) is not implemented yet\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/but-forge/src/review.rs","lineNumber":2037,"sourceCode":"                    .try_into()\n                    .context(\"PR: Failed to cast usize to i64, somehow\")?;\n                let params = but_bitbucket::UpdatePullRequestParams {\n                    workspace: owner,\n                    repo_slug: repo,\n                    id,\n                    title: title.as_deref(),\n                    description: body.as_deref(),\n                    target_branch: target_base.as_deref(),\n                };\n                but_bitbucket::pr::update(preferred_account, params, storage).await?;\n            }\n            if matches!(state, Some(ReviewState::Closed)) {\n                but_bitbucket::pr::decline(preferred_account, owner, repo, review_number, storage)\n                    .await?;\n            }\n            Ok(())\n        }\n        _ => Err(anyhow::anyhow!(\n            \"Updating pull requests for forge {forge:?} is not implemented yet.\"\n        )),\n    }\n}\n\n#[derive(Debug, Clone, Serialize, Deserialize)]\n#[cfg_attr(feature = \"export-schema\", derive(schemars::JsonSchema))]\n#[serde(rename_all = \"lowercase\")]\npub enum ReviewState {\n    Open,\n    Closed,\n}\n\n#[cfg(feature = \"export-schema\")]\nbut_schemars::register_sdk_type!(ReviewState);\n\nimpl ReviewState {\n    fn as_github_str(&self) -> &'static str {","sourceCodeStart":2019,"sourceCodeEnd":2055,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/caf1f223d3cfb94488c9198ad34487c6006c648f/crates/but-forge/src/review.rs#L2019-L2055","documentation":"`update_review()` (title/body/state/target-base changes) has arms for GitHub (PR update plus state), GitLab (`state_event` close/reopen) and Bitbucket (edit plus decline, reopen rejected). The remaining variant, Azure, falls into the wildcard arm and this error is returned before anything is sent to the forge.","triggerScenarios":"Any `update_review` call — rename, retitle, close, retarget — with `ForgeRepoInfo.forge: azure`. All three implemented forges never hit this arm.","commonSituations":"Azure DevOps remotes; future `ForgeName` variants added without update support; edit UIs shown for every forge.","solutions":["Manage Azure DevOps PRs through Azure's native API or web extension.","Disable edit/rename/close/retarget UI for Azure-hosted reviews.","Implement a `but_azure` update backend and extend the match at crates/but-forge/src/review.rs:1966."],"exampleFix":"// before\nupdate_review(&user, &info, number, payload, &storage).await?;\n\n// after\nif matches!(info.forge, ForgeName::Azure) {\n    return Ok(()); // updates unsupported on Azure; hide the edit UI\n}\nupdate_review(&user, &info, number, payload, &storage).await?;","handlingStrategy":"validation","validationCode":"use but_forge::forge::ForgeName;\n\nif matches!(info.forge, ForgeName::Azure) {\n    // hide PR edit/close/retarget UI; update_review has no Azure arm\n}","typeGuard":"fn review_updates_supported(forge: &but_forge::forge::ForgeName) -> bool {\n    !matches!(forge, ForgeName::Azure)\n}","tryCatchPattern":"match update_review(&user, &info, number, payload, &storage).await {\n    Ok(()) => {}\n    Err(e) if e.to_string().contains(\"not implemented yet\") => { /* leave PR unchanged */ }\n    Err(e) => return Err(e),\n}","preventionTips":["Gate the whole review-edit surface (rename/close/retarget) on the forge, not each field separately.","This error is deterministic for Azure — never retry it.","When a new forge variant is added, update capability checks and this match in the same change."],"tags":["rust","but-forge","pull-request","update","azure","not-implemented"],"backgroundTag":"not-implemented-for-platform","analyzedSha":"caf1f223d3cfb94488c9198ad34487c6006c648f","analyzedAt":"2026-08-20T07:55:40.983Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}