pub async fn own_prs(api: Arc<bitbucket::Api>, config: Arc<Config>) -> Result<usize> {
    let mut params: HashMap<&str, String> = HashMap::with_capacity(2);
    params.insert("state", "open".to_string());
    params.insert("role", "author".to_string());
    info!("Fetching list of own PR's");
    let prs = api.get_prs(Some(params)).await?;
    let n_prs = prs.len();
    let username = prs[0].author().expect("No author field").to_string();
    info!("Scanning {}'s PR's", username);
    check_prs(api, prs, Arc::new(username), config).await;
    Ok(n_prs)
}
/// Search PR's authored by the authenticated user for the merge trigger and returns the number of
/// PR's checked.
Search PR's authored by the authenticated user for the merge trigger and returns the number of
PR's checked.
Search PR ' s authored by the authenticated user for the merge trigger and returns the number of PR ' s checked .
pub async fn own_prs(api: Arc<bitbucket::Api>, config: Arc<Config>) -> Result<usize> {
    let mut params: HashMap<&str, String> = HashMap::with_capacity(2);
    params.insert("state", "open".to_string());
    params.insert("role", "author".to_string());
    info!("Fetching list of own PR's");
    let prs = api.get_prs(Some(params)).await?;
    let n_prs = prs.len();
    let username = prs[0].author().expect("No author field").to_string();
    info!("Scanning {}'s PR's", username);
    check_prs(api, prs, Arc::new(username), config).await;
    Ok(n_prs)
}
pub async fn own_prs ( api : Arc < bitbucket :: Api > , config : Arc < Config > ) -> Result < usize > { let mut params : HashMap < & str , String > = HashMap :: with_capacity ( 2 ) ; params . insert ( " " , " " . to_string ( ) ) ; params . insert ( " " , " " . to_string ( ) ) ; info ! ( " " ) ; let prs = api . get_prs ( Some ( params ) ) . await ? ; let n_prs = prs . len ( ) ; let username = prs [ 0 ] . author ( ) . expect ( " " ) . to_string ( ) ; info ! ( " " username ) ; check_prs ( api , prs , Arc :: new ( username ) , config ) . await ; Ok ( n_prs ) }
Search PR's authored by the authenticated user for the merge trigger and returns the number of
PR's checked.
Search PR ' s authored 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>