gitbutlerapp/gitbutler · error · anyhow::Error

Fetching repo info for forge {:?} is not implemented yet.

Error message

Fetching repo info for forge {:?} is not implemented yet.

What it means

RepoInfo fetching in but-forge supports GitHub, GitLab and Bitbucket; for any other ForgeName the match arm returns this not-implemented error instead of repository metadata. Azure DevOps is the concrete forge that currently falls through.

Source

Thrown at crates/but-forge/src/repo.rs:37

            let gh = but_github::GitHubClient::from_storage(storage, preferred_account)?;
            gh.get_repo(owner, repo).await.map(RepoInfo::from)
        }
        ForgeName::GitLab => {
            let preferred_account = preferred_forge_user.as_ref().and_then(|user| user.gitlab());
            let project_id = but_gitlab::GitLabProjectId::new(owner, repo);
            but_gitlab::fetch_project(preferred_account, project_id, storage)
                .await
                .map(RepoInfo::from)
        }
        ForgeName::Bitbucket => {
            let preferred_account = preferred_forge_user
                .as_ref()
                .and_then(|user| user.bitbucket());
            but_bitbucket::fetch_repo(preferred_account, owner, repo, storage)
                .await
                .map(RepoInfo::from)
        }
        ForgeName::Azure => Err(anyhow::anyhow!(
            "Fetching repo info for forge {:?} is not implemented yet.",
            forge_repo_info.forge
        )),
    }
}

#[derive(Debug, Clone, Serialize)]
#[cfg_attr(feature = "export-schema", derive(schemars::JsonSchema))]
#[serde(rename_all = "camelCase")]
pub struct RepoInfo {
    pub permissions: Option<RepoPermissions>,
    pub fork: bool,
    /// Whether the repo deletes the source branch after a PR is merged
    /// (GitHub's per-repo "Automatically delete head branches" setting).
    /// `None` when the field wasn't returned by the forge.
    pub delete_branch_on_merge: Option<bool>,
}

View on GitHub (pinned to caf1f223d3)

Solutions

  1. For unsupported forges, fetch repository metadata via the forge's own API/CLI
  2. Skip repo-info features for those remotes and degrade gracefully
  3. Track or contribute the Azure arm in crates/but-forge/src/repo.rs backed by an Azure client
Defensive patterns

Strategy: fallback

Validate before calling

// Rust: gate repo-info fetching on supported forges
if !matches!(forge, ForgeName::GitHub | ForgeName::GitLab | ForgeName::Bitbucket) {
    // skip fetch_repo_info; fetch metadata via the forge's own API instead
}

Type guard

fn supports_repo_info(forge: ForgeName) -> bool {
    matches!(forge, ForgeName::GitHub | ForgeName::GitLab | ForgeName::Bitbucket)
}

Try / catch

match fetch_repo_info(&forge_repo_info).await {
    Err(err) if err.to_string().contains("is not implemented yet") => {
        // degrade: hide repo metadata features for this remote
    }
    result => result,
}

Prevention

When it happens

Trigger: Calling fetch_repo_info (crates/but-forge/src/repo.rs) for a repository whose forge resolves to Azure DevOps.

Common situations: Same gap as CI listing: Azure DevOps remotes in mixed-forge setups; tooling that resolves repo info for every remote uniformly.

Related errors


AI-assisted analysis of gitbutlerapp/gitbutler@caf1f223d3 (2026-08-20). Data as JSON: /api/errors/bed5190e41b9a429. Report an issue: GitHub.