Skip to content

Commit

Permalink
Merge pull request #42 from Oxen-AI/fix/create-repo-in-org
Browse files Browse the repository at this point in the history
fix scheme in create_repo call
  • Loading branch information
gschoeni committed Mar 12, 2024
2 parents 8febd30 + c47f764 commit 5aacba9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions oxen/python/oxen/remote_repo.py
Expand Up @@ -113,6 +113,8 @@ def __init__(
The host to connect to. Defaults to 'hub.oxen.ai'
revision: `str`
The branch name or commit id to checkout. Defaults to 'main'
scheme: `str`
The scheme to use for the remote url. Default: 'https'
"""
if host is None:
host = "hub.oxen.ai"
Expand All @@ -131,8 +133,6 @@ def create(self, empty: bool = False, is_public: bool = False):
Whether to create an empty repo or not. Default: False
is_public: `bool`
Whether the repository is public or private. Default: False
scheme: `str`
The scheme to use for the remote url. Default: 'https'
"""
self._repo.create(empty, is_public)

Expand Down
2 changes: 2 additions & 0 deletions oxen/src/py_remote_repo.rs
Expand Up @@ -21,6 +21,7 @@ use crate::py_paginated_dir_entries::PyPaginatedDirEntries;
#[pyclass]
pub struct PyRemoteRepo {
pub repo: RemoteRepository,
#[pyo3(get)]
pub host: String,
#[pyo3(get)]
pub revision: String,
Expand Down Expand Up @@ -107,6 +108,7 @@ impl PyRemoteRepo {
user: user.clone()
}];
let mut repo = RepoNew::from_files(&self.repo.namespace, &self.repo.name, files);
repo.host = Some(self.host.clone());
repo.is_public = Some(is_public);
repo.scheme = Some(self.scheme.clone());
api::remote::repositories::create(repo).await
Expand Down
2 changes: 2 additions & 0 deletions oxen/src/remote.rs
Expand Up @@ -58,6 +58,7 @@ pub fn create_repo(
repo.description = Some(description);
}
repo.is_public = Some(is_public);
repo.scheme = Some(scheme.clone());

liboxen::api::remote::repositories::create_empty(repo).await
} else {
Expand All @@ -73,6 +74,7 @@ pub fn create_repo(
repo.description = Some(description);
}
repo.is_public = Some(is_public);
repo.scheme = Some(scheme.clone());

liboxen::api::remote::repositories::create(repo).await
}
Expand Down

0 comments on commit 5aacba9

Please sign in to comment.