gitbutlerapp/gitbutler · warning

Listing ci checks for forge

Error message

Listing ci checks for forge {forge:?} is not implemented yet.

What it means

ci_checks_for_ref only implements CI check listing for the forges it matches (GitHub, etc.). When the resolved ForgeName falls into the wildcard `_` arm, this anyhow error is returned stating listing CI checks is not implemented for that forge.

Solutions

  1. Verify the repository remote points to a supported forge (GitHub, GitLab, Bitbucket)
  2. Add a match arm implementing CI listing for the missing forge, or explicitly filter unsupported forges earlier with a clear user-facing message
  3. If the forge should be supported, check for forge-detection bugs in remote URL parsing

Example fix

// before
_ => Err(anyhow::anyhow!("Listing ci checks for forge {forge:?} is not implemented yet."))
// after
ForgeName::Azure => Err(anyhow::anyhow!("Azure DevOps CI check listing is not supported; use a GitHub/GitLab/Bitbucket remote")),
forge => Err(anyhow::anyhow!(...))
Defensive patterns

Strategy: validation

Validate before calling

const SUPPORTED: &[ForgeName] = &[ForgeName::GitHub, ForgeName::GitLab, ForgeName::Bitbucket];
if !SUPPORTED.contains(&forge_repo_info.forge) {
    return Err("CI checks are only supported for GitHub, GitLab and Bitbucket");
}

Try / catch

match ci_checks_for_ref(...) {
    Ok(statuses) => statuses,
    Err(e) if e.to_string().contains("not implemented") => Vec::new(), // treat as no CI data
    Err(e) => return Err(e),
}

Prevention

When it happens

Trigger: Calling the CI-check fetch path (via fetch_and_refresh_cache) with a forge_repo_info whose forge is one of the unimplemented variants, e.g. ForgeName::Azure or any other unsupported forge.

Common situations: Repository remote points at an Azure DevOps (or other unsupported) host; forge detection misidentifies the host from the remote URL; a new forge variant added to ForgeName before CI support was implemented.

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


AI-assisted analysis of gitbutlerapp/gitbutler@58e5313667 (2026-09-18). Data as JSON: /api/errors/90fd890dbb72a88c. Report an issue: GitHub.

Appendix: source

Thrown at crates/but-forge/src/ci.rs:203

                    &reference,
                    &storage,
                ))
            })
            .join()
            .map_err(|e| anyhow::anyhow!("Failed to join thread: {e:?}"))??;

            Ok(statuses.map(|statuses| {
                statuses
                    .into_iter()
                    .map(|status| {
                        let mut ci_check = CiCheck::from(status);
                        ci_check.reference = reference_for_checks.to_string();
                        ci_check
                    })
                    .collect()
            }))
        }
        _ => Err(anyhow::anyhow!(
            "Listing ci checks for forge {forge:?} is not implemented yet."
        )),
    }
}

#[derive(Debug, Clone, Serialize)]
#[cfg_attr(feature = "export-schema", derive(schemars::JsonSchema))]
#[serde(rename_all = "camelCase")]
pub struct CiCheck {
    pub id: i64,
    pub name: String,
    pub output: CiOutput,
    pub started_at: Option<chrono::DateTime<chrono::Utc>>,
    pub status: CiStatus,
    pub head_sha: String,
    pub url: String,
    pub html_url: String,
    pub details_url: String,

View on GitHub (pinned to 58e5313667)