gitbutlerapp/gitbutler · error
Updating pull requests for forge
Error message
Updating pull requests for forge {forge:?} is not implemented yet. What it means
`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.
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.
Example fix
// before
forgejo_update_review(...).await?; // falls into `_` arm -> not implemented
// after
match forge {
ForgeName::Github | ForgeName::GitLab | ForgeName::Bitbucket => update_review(...).await?,
other => eprintln!("PR updates unsupported for {other:?}; skipping"),
} Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED_UPDATE_FORGES: &[ForgeName] = &[ForgeName::Github, ForgeName::GitLab, ForgeName::Bitbucket];
if !SUPPORTED_UPDATE_FORGES.contains(&forge) { skip_update(); } Try / catch
match update_review(...) {
Err(e) if e.to_string().contains("is not implemented yet") => {
eprintln!("PR updates unsupported for this forge; skipping");
}
other => other?,
} Prevention
- 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
When it happens
Trigger: 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).
Common situations: 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.
Related errors
- Azure is unsupported at the minute. Sorry 😞.
- Bitbucket does not support reopening a declined pull…
- Branch ` ` is not part of the current workspace
- Branch ` ` is pushed, but its remote ancestry does not…
- Could not determine selected review template
AI-assisted analysis of gitbutlerapp/gitbutler@58e5313667 (2026-09-18).
Data as JSON: /api/errors/b2e23e8427fa826f.
Report an issue: GitHub.
Appendix: source
Thrown at crates/but-forge/src/review.rs:2497
.try_into()
.context("PR: Failed to cast usize to i64, somehow")?;
let params = but_bitbucket::UpdatePullRequestParams {
workspace: owner,
repo_slug: repo,
id,
title: title.as_deref(),
description: body.as_deref(),
target_branch: target_base.as_deref(),
};
but_bitbucket::pr::update(preferred_account, params, storage).await?;
}
if matches!(state, Some(ReviewState::Closed)) {
but_bitbucket::pr::decline(preferred_account, owner, repo, review_number, storage)
.await?;
}
Ok(())
}
_ => Err(anyhow::anyhow!(
"Updating pull requests for forge {forge:?} is not implemented yet."
)),
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "export-schema", derive(schemars::JsonSchema))]
#[serde(rename_all = "lowercase")]
pub enum ReviewState {
Open,
Closed,
}
#[cfg(feature = "export-schema")]
but_schemars::register_sdk_type!(ReviewState);
impl ReviewState {
fn as_github_str(&self) -> &'static str {View on GitHub (pinned to 58e5313667)