Skip to content

Commit 5bba49d

Browse files
Use the type Url for the git-sync repository URL
1 parent 6619fe4 commit 5bba49d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

crates/stackable-operator/src/crd/git_sync/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use std::{collections::BTreeMap, path::PathBuf};
44

55
use schemars::{self, JsonSchema};
66
use serde::{Deserialize, Serialize};
7+
use url::Url;
78

89
use crate::{time::Duration, versioned::versioned};
910

@@ -19,7 +20,7 @@ pub mod versioned {
1920
#[serde(rename_all = "camelCase")]
2021
pub struct GitSync {
2122
/// The git repository URL that will be cloned, for example: `https://github.com/stackabletech/airflow-operator`.
22-
pub repo: String,
23+
pub repo: Url,
2324

2425
/// The branch to clone; defaults to `main`.
2526
///

crates/stackable-operator/src/crd/git_sync/v1alpha1_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ impl GitSyncResources {
234234
container_log_config: &ContainerLogConfig,
235235
) -> String {
236236
let internal_args = [
237-
Some(("--repo".to_string(), git_sync.repo.to_owned())),
237+
Some(("--repo".to_string(), git_sync.repo.as_str().to_owned())),
238238
Some(("--ref".to_string(), git_sync.branch.to_owned())),
239239
Some(("--depth".to_string(), git_sync.depth.to_string())),
240240
Some((

0 commit comments

Comments
 (0)