release/v0.7.4
claude/smbcloud-github-app-k9641p
development
feature/apps
feature/build-release
feature/ci-docs
feature/ci-ruby-gems
feature/cicd
feature/completion
feature/dist-nuget
feature/fix-ci-sdk-pypi-rubygem
feature/fix-clippy-on-stable-channel
feature/fix-deployment-script
feature/github-email
feature/gresiq-v1
feature/project-new-structure
feature/rsync-deploy
feature/ruby-runner
feature/sdk-npm
feature/sdk-workflows
feature/smbcloud-cli-release-npm
feature/smbcloud-deploy
feature/wasm
main
release/v0.7.4
| 1 | use { |
| 2 | crate::url_builder::build_deploy_repos_url, |
| 3 | reqwest::Client, |
| 4 | smbcloud_model::{ |
| 5 | error_codes::ErrorResponse, |
| 6 | frontend_app::{DeployRepo, DeployRepoCreate}, |
| 7 | }, |
| 8 | smbcloud_network::{environment::Environment, network::request}, |
| 9 | smbcloud_networking::{constants::SMB_USER_AGENT, smb_client::SmbClient}, |
| 10 | }; |
| 11 | |
| 12 | pub async fn create_deploy_repo( |
| 13 | env: Environment, |
| 14 | client: (&SmbClient, &str), |
| 15 | access_token: String, |
| 16 | payload: DeployRepoCreate, |
| 17 | ) -> Result<DeployRepo, ErrorResponse> { |
| 18 | let builder = Client::new() |
| 19 | .post(build_deploy_repos_url(env, client)) |
| 20 | .json(&payload) |
| 21 | .header("Authorization", access_token) |
| 22 | .header("User-agent", SMB_USER_AGENT); |
| 23 | request(builder).await |
| 24 | } |