Skip to main content

Mountain/Command/SourceControlManagement/
GetSCMBranches.rs

1#![allow(non_snake_case)]
2
3//! Tauri command - list branches for an SCM provider. Drives the
4//! branch picker UI.
5//!
6//! ## Stub
7//!
8//! Wire to `SourceControlManagementProvider::GetBranches` so local
9//! and remote branches with tracking relationships and current-branch
10//! indicator are returned.
11
12use std::sync::Arc;
13
14use serde_json::{Value, json};
15use tauri::{State, command};
16
17use crate::{ApplicationState::State::ApplicationState::ApplicationState, dev_log};
18
19#[command]
20pub async fn GetSCMBranches(
21	_State:State<'_, Arc<ApplicationState>>,
22
23	ProviderIdentifier:String,
24) -> Result<Value, String> {
25	dev_log!("commands", "getting branches for provider: {}", ProviderIdentifier);
26
27	Ok(json!({
28		"branches": [
29			{ "name": "main", "isCurrent": true },
30			{ "name": "develop", "isCurrent": false },
31		],
32	}))
33}