gitbutlerapp/gitbutler · warning
Review requests for forge
Error message
Review requests for forge {forge:?} are not implemented yet. What it means
`but_forge::review::request_review` implements requesting reviewers only for GitHub. Any `ForgeName` other than `ForgeName::GitHub` reaches the `_` arm and returns this anyhow error. It is a deliberate not-implemented marker, not a data or network problem.
Solutions
- Perform reviewer requests only on GitHub repositories.
- Pre-check `repo_info.forge` and disable/hide the reviewer-request action for non-GitHub forges in the UI.
- Implement the missing `ForgeName` arm (e.g. GitLab's `POST /merge_requests/:iid/approvals` or reviewer API) if upstream support is desired.
Example fix
// before
but_forge::review::request_review(&user, &repo_info, pr_number, &["alice".into()], &storage).await?;
// after
if repo_info.forge != ForgeName::GitHub {
anyhow::bail!("requesting reviewers is only supported on GitHub");
}
but_forge::review::request_review(&user, &repo_info, pr_number, &["alice".into()], &storage).await?; Defensive patterns
Strategy: validation
Validate before calling
if repo_info.forge != ForgeName::GitHub {
return Err(anyhow!("requesting reviewers is only supported on GitHub"));
} Type guard
fn supports_review_requests(info: &ForgeRepoInfo) -> bool {
matches!(info.forge, ForgeName::GitHub)
} Prevention
- Feature-gate review-request actions on `forge == ForgeName::GitHub`.
- Test review workflows against each forge you support, not only GitHub.
- Disable reviewer pickers on non-GitHub forges before invoking the API.
When it happens
Trigger: Calling `request_review` with `forge_repo_info.forge` set to a non-GitHub variant while attempting to assign reviewers to a review number.
Common situations: Selecting reviewers on a GitLab-hosted merge request; an app/CLI feature that assumes GitHub but runs on a GitLab checkout; SDK consumers calling the request-review endpoint on an unimplemented forge.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Reviewer candidates for forge
- Review comments for forge
- Azure is unsupported at the minute. Sorry 😞.
- Branch ` ` is not part of the current workspace
- Branch ` ` is pushed, but its remote ancestry does not…
AI-assisted analysis of gitbutlerapp/gitbutler@58e5313667 (2026-09-18).
Data as JSON: /api/errors/d95b2944cd0b701a.
Report an issue: GitHub.
Appendix: source
Thrown at crates/but-forge/src/review.rs:1428
storage: &but_forge_storage::Controller,
) -> Result<()> {
let crate::forge::ForgeRepoInfo {
forge, owner, repo, ..
} = forge_repo_info;
match forge {
ForgeName::GitHub => {
let preferred_account = preferred_forge_user.as_ref().and_then(|user| user.github());
but_github::pr::request_reviewers(
preferred_account,
owner,
repo,
review_number,
logins,
storage,
)
.await
}
_ => Err(anyhow::anyhow!(
"Review requests for forge {forge:?} are not implemented yet."
)),
}
}
/// Withdraw review requests for the given users on a review.
pub async fn withdraw_review_request(
preferred_forge_user: &Option<crate::ForgeUser>,
forge_repo_info: &crate::forge::ForgeRepoInfo,
review_number: usize,
logins: &[String],
storage: &but_forge_storage::Controller,
) -> Result<()> {
let crate::forge::ForgeRepoInfo {
forge, owner, repo, ..
} = forge_repo_info;
match forge {
ForgeName::GitHub => {View on GitHub (pinned to 58e5313667)