{"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":null,"httpStatus":null,"severity":"error","filePath":"crates/but-forge/src/review.rs","lineNumber":2497,"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":2479,"sourceCodeEnd":2515,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/58e5313667b857ef39a730e380af31816a7b1768/crates/but-forge/src/review.rs#L2479-L2515","documentation":"`update_review` matches on the forge kind and only implements GitHub, GitLab, and Bitbucket update paths; any other forge variant falls into the `_` catch-all which returns this 'not implemented yet' error. It is a feature-gap signal, not a data or network problem.","triggerScenarios":"Calling `update_review` with a forge whose variant is not one of the implemented arms (e.g. a forge added to `ForgeName` without an update implementation).","commonSituations":"Configuring a project against a newly supported forge and attempting PR edits; running code between the addition of a `ForgeName` variant and its `update_review` implementation.","solutions":["Check which forge the project is configured for; switch to GitHub/GitLab/Bitbucket if PR updates are required.","Avoid calling `update_review` for unsupported forges; check the forge kind first.","Implement the missing forge arm in `update_review` if you maintain the code.","Track upstream for the forge's update implementation."],"exampleFix":"// before\nforgejo_update_review(...).await?; // falls into `_` arm -> not implemented\n\n// after\nmatch forge {\n    ForgeName::Github | ForgeName::GitLab | ForgeName::Bitbucket => update_review(...).await?,\n    other => eprintln!(\"PR updates unsupported for {other:?}; skipping\"),\n}","handlingStrategy":"validation","validationCode":"const SUPPORTED_UPDATE_FORGES: &[ForgeName] = &[ForgeName::Github, ForgeName::GitLab, ForgeName::Bitbucket];\nif !SUPPORTED_UPDATE_FORGES.contains(&forge) { skip_update(); }","typeGuard":null,"tryCatchPattern":"match update_review(...) {\n    Err(e) if e.to_string().contains(\"is not implemented yet\") => {\n        eprintln!(\"PR updates unsupported for this forge; skipping\");\n    }\n    other => other?,\n}","preventionTips":["Check the project's configured forge before calling PR-update APIs","Feature-detect: only expose PR editing in UIs/CLIs for supported forges","Keep an allowlist of forges with implemented update paths"],"tags":["forge","not-implemented","pull-request","feature-gap"],"backgroundTag":"method-not-implemented","analyzedSha":"58e5313667b857ef39a730e380af31816a7b1768","analyzedAt":"2026-09-18T06:50:32.052Z","contentChangedAt":"2026-09-18T06:50:32.052Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}