{"record":{"id":"bed5190e41b9a429","repo":"gitbutlerapp/gitbutler","slug":"fetching-repo-info-for-forge-is-not-implement","errorCode":null,"errorMessage":"Fetching repo info for forge {:?} is not implemented yet.","messagePattern":"Fetching repo info for forge (.+?) is not implemented yet\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"crates/but-forge/src/repo.rs","lineNumber":37,"sourceCode":"            let gh = but_github::GitHubClient::from_storage(storage, preferred_account)?;\n            gh.get_repo(owner, repo).await.map(RepoInfo::from)\n        }\n        ForgeName::GitLab => {\n            let preferred_account = preferred_forge_user.as_ref().and_then(|user| user.gitlab());\n            let project_id = but_gitlab::GitLabProjectId::new(owner, repo);\n            but_gitlab::fetch_project(preferred_account, project_id, storage)\n                .await\n                .map(RepoInfo::from)\n        }\n        ForgeName::Bitbucket => {\n            let preferred_account = preferred_forge_user\n                .as_ref()\n                .and_then(|user| user.bitbucket());\n            but_bitbucket::fetch_repo(preferred_account, owner, repo, storage)\n                .await\n                .map(RepoInfo::from)\n        }\n        ForgeName::Azure => Err(anyhow::anyhow!(\n            \"Fetching repo info for forge {:?} is not implemented yet.\",\n            forge_repo_info.forge\n        )),\n    }\n}\n\n#[derive(Debug, Clone, Serialize)]\n#[cfg_attr(feature = \"export-schema\", derive(schemars::JsonSchema))]\n#[serde(rename_all = \"camelCase\")]\npub struct RepoInfo {\n    pub permissions: Option<RepoPermissions>,\n    pub fork: bool,\n    /// Whether the repo is visible only to people granted access.\n    /// `None` when the forge does not report it — Azure, or a GitLab token\n    /// without the scope to read project metadata.\n    pub private: Option<bool>,\n    /// Whether the repo deletes the source branch after a PR is merged\n    /// (GitHub's per-repo \"Automatically delete head branches\" setting).","sourceCodeStart":19,"sourceCodeEnd":55,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/58e5313667b857ef39a730e380af31816a7b1768/crates/but-forge/src/repo.rs#L19-L55","documentation":"get_repo_info in crates/but-forge/src/repo.rs implements repository info fetching for GitHub, GitLab, and Bitbucket. When the forge is Azure (or any other unimplemented variant), it returns this error.","triggerScenarios":"Calling get_repo_info with a ForgeRepoInfo whose forge is ForgeName::Azure; the public API call is made against a repository hosted on an unsupported forge.","commonSituations":"Project remote is on Azure DevOps; user configured a remote URL for an unsupported host; forge detection produced Azure from the remote URL.","solutions":["Use a repository hosted on a supported forge (GitHub, GitLab, Bitbucket)","Add a ForgeName::Azure arm that delegates to a new but_azure repo-info fetcher if Azure support is needed","Check forge detection of the remote URL if Azure was not expected"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if forge_repo_info.forge == ForgeName::Azure {\n    return Err(\"Repo info fetching is not supported for Azure DevOps repositories\");\n}","typeGuard":null,"tryCatchPattern":"match get_repo_info(...) {\n    Ok(info) => info,\n    Err(e) if e.to_string().contains(\"not implemented\") => return Err(user_facing_unsupported_forge_error()),\n    Err(e) => return Err(e),\n}","preventionTips":["Validate the forge type early in the caller flow","Only expose repo-info features for supported forges in the UI","Track and test every ForgeName variant against implemented API surfaces"],"tags":["rust","unsupported-forge","api"],"backgroundTag":"method-not-implemented","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"}