pub async fn approved_prs(api: Arc<bitbucket::Api>, config: Arc<Config>) -> Result<usize> {
    let mut params: HashMap<&str, String> = HashMap::with_capacity(3);
    params.insert("state", "open".to_string());
    params.insert("role", "reviewer".to_string());
    params.insert("participantStatus", "approved".to_string());
    info!("Fetching approved PR's");
    let (prs, username) = future::join(api.get_prs(Some(params)), api.get_username()).await;
    let prs = prs?;
    let username = username?;

    let n_prs = prs.len();
    info!("Scanning PR's approved by {}", username);
    check_prs(api, prs, Arc::new(username), config).await;
    Ok(n_prs)
}
/// Searches PR's approved by the authenticated user for the merge trigger and returns the number
/// of PR's checked.
Searches PR's approved by the authenticated user for the merge trigger and returns the number
of PR's checked.
Searches PR ' s approved by the authenticated user for the merge trigger and returns the number of PR ' s checked .
pub async fn approved_prs(api: Arc<bitbucket::Api>, config: Arc<Config>) -> Result<usize> {
    let mut params: HashMap<&str, String> = HashMap::with_capacity(3);
    params.insert("state", "open".to_string());
    params.insert("role", "reviewer".to_string());
    params.insert("participantStatus", "approved".to_string());
    info!("Fetching approved PR's");
    let (prs, username) = future::join(api.get_prs(Some(params)), api.get_username()).await;
    let prs = prs?;
    let username = username?;
    let n_prs = prs.len();
    info!("Scanning PR's approved by {}", username);
    check_prs(api, prs, Arc::new(username), config).await;
    Ok(n_prs)
}
pub async fn approved_prs ( api : Arc < bitbucket :: Api > , config : Arc < Config > ) -> Result < usize > { let mut params : HashMap < & str , String > = HashMap :: with_capacity ( 3 ) ; params . insert ( " " , " " . to_string ( ) ) ; params . insert ( " " , " " . to_string ( ) ) ; params . insert ( " " , " " . to_string ( ) ) ; info ! ( " " ) ; let ( prs , username ) = future :: join ( api . get_prs ( Some ( params ) ) , api . get_username ( ) ) . await ; let prs = prs ? ; let username = username ? ; let n_prs = prs . len ( ) ; info ! ( " " username ) ; check_prs ( api , prs , Arc :: new ( username ) , config ) . await ; Ok ( n_prs ) }
Searches PR's approved by the authenticated user for the merge trigger and returns the number
of PR's checked.
Searches PR ' s approved by the authenticated user for the merge trigger and returns the number of PR ' s checked .
api
Arc<bitbucket::Api>
config
Arc<Config>
api
Arc<bitbucket::Api>
config
Arc<Config>