Skip to content

Commit

Permalink
changes back to main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
MuskanPaliwal committed Oct 26, 2023
1 parent 0a87d52 commit e7d96ec
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
3 changes: 1 addition & 2 deletions vibi-dpu/src/bitbucket/comment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ use crate::db::user::get_workspace_user_from_db;
use crate::utils::review::Review;
use crate::utils::user::BitbucketUser;

use super::{config::{bitbucket_base_url, prepare_headers}};
use crate::client::config::get_client;
use super::{config::{bitbucket_base_url, get_client, prepare_headers}};

#[derive(Serialize)]
struct Comment {
Expand Down
14 changes: 13 additions & 1 deletion vibi-dpu/src/bitbucket/config.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
use std::{env, collections::HashMap};
use std::error::Error;

use reqwest::{Response, header::{HeaderMap, HeaderValue}};
use serde_json::Value;
use crate::client::config::get_client;
use std::sync::Arc;
use once_cell::sync::Lazy;
use reqwest::Client;

static CLIENT: Lazy<Arc<Client>> = Lazy::new(|| {
Arc::new(Client::new())
});

pub fn get_client() -> Arc<Client> {
Arc::clone(&CLIENT)
}

pub fn bitbucket_base_url() -> String {
env::var("BITBUCKET_BASE_URL").expect("BITBUCKET_BASE_URL must be set")
Expand Down

0 comments on commit e7d96ec

Please sign in to comment.