{"record":{"id":"0e812f3f542dc40f","repo":"gitbutlerapp/gitbutler","slug":"review-comments-for-forge-forge-are-not-implem","errorCode":null,"errorMessage":"Review comments for forge {forge:?} are not implemented yet.","messagePattern":"Review comments for forge (.+?) are not implemented yet\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"crates/but-forge/src/review.rs","lineNumber":1530,"sourceCode":") -> Result<ForgeReviewComment> {\n    let crate::forge::ForgeRepoInfo {\n        forge, owner, repo, ..\n    } = forge_repo_info;\n    match forge {\n        ForgeName::GitHub => {\n            let preferred_account = preferred_forge_user.as_ref().and_then(|user| user.github());\n            let comment = but_github::pr::update_comment(\n                preferred_account,\n                owner,\n                repo,\n                comment_id,\n                body,\n                storage,\n            )\n            .await?;\n            Ok(comment.into())\n        }\n        _ => Err(anyhow::anyhow!(\n            \"Review comments for forge {forge:?} are not implemented yet.\"\n        )),\n    }\n}\n\n/// Delete a top-level conversation comment.\npub async fn delete_review_comment(\n    preferred_forge_user: &Option<crate::ForgeUser>,\n    forge_repo_info: &crate::forge::ForgeRepoInfo,\n    comment_id: i64,\n    storage: &but_forge_storage::Controller,\n) -> Result<()> {\n    let crate::forge::ForgeRepoInfo {\n        forge, owner, repo, ..\n    } = forge_repo_info;\n    match forge {\n        ForgeName::GitHub => {\n            let preferred_account = preferred_forge_user.as_ref().and_then(|user| user.github());","sourceCodeStart":1512,"sourceCodeEnd":1548,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/58e5313667b857ef39a730e380af31816a7b1768/crates/but-forge/src/review.rs#L1512-L1548","documentation":"`but_forge::review::update_review_comment` implements editing a top-level review comment only for GitHub; any other `ForgeName` hits the `_` arm and returns this anyhow error. It marks a forge backend that has not been implemented yet rather than a permissions or network failure (forges enforce their own permissions downstream).","triggerScenarios":"Calling `update_review_comment` with `forge_repo_info.forge` other than `ForgeName::GitHub` while editing a review comment identified by `comment_id`.","commonSituations":"Editing a merge-request comment via GitButler on a GitLab remote; a UI that renders an edit affordance for all comments regardless of forge; SDK/CLI callers using the edit-comment endpoint on an unsupported forge.","solutions":["Edit review comments only on GitHub repositories.","Pre-check `repo_info.forge` and hide/disable the edit action on non-GitHub forges.","Implement the missing forge arm with the forge's comment-edit API (e.g. GitLab `PUT /merge_requests/.../notes/:id`)."],"exampleFix":"// before\nlet c = but_forge::review::update_review_comment(&user, &repo_info, cid, \"new body\", &storage).await?;\n// after\nif repo_info.forge != ForgeName::GitHub {\n    anyhow::bail!(\"editing review comments is only supported on GitHub\");\n}\nlet c = but_forge::review::update_review_comment(&user, &repo_info, cid, \"new body\", &storage).await?;","handlingStrategy":"validation","validationCode":"if repo_info.forge != ForgeName::GitHub {\n    return Err(anyhow!(\"editing review comments is only supported on GitHub\"));\n}","typeGuard":"fn supports_comment_edit(info: &ForgeRepoInfo) -> bool {\n    matches!(info.forge, ForgeName::GitHub)\n}","tryCatchPattern":null,"preventionTips":["Only offer comment edit affordances when the repo's forge is GitHub.","Remember the forge enforces its own permissions downstream; still pre-check forge support separately.","Centralize forge capability checks for comment operations."],"tags":["forge","unsupported-forge","comments","github-only"],"backgroundTag":"unsupported-operation","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"}