Mountain/Command/SourceControlManagement/
GetSCMBranches.rs1
2use std::sync::Arc;
12
13use serde_json::{Value, json};
14use tauri::{State, command};
15
16use crate::{ApplicationState::State::ApplicationState::ApplicationState, dev_log};
17
18#[command]
19pub async fn GetSCMBranches(
20 _State:State<'_, Arc<ApplicationState>>,
21
22 ProviderIdentifier:String,
23) -> Result<Value, String> {
24 dev_log!("commands", "getting branches for provider: {}", ProviderIdentifier);
25
26 Ok(json!({
27 "branches": [
28 { "name": "main", "isCurrent": true },
29 { "name": "develop", "isCurrent": false },
30 ],
31 }))
32}