// use std::collections::HashSet; use crate::model::Config; use anyhow::Result; use super::Issue; pub async fn fetch_open_issues<'net, 'fs>(config: &Config<'net, 'fs>) -> Result> { let server_url = config.server(); let repo = config.repo(); let url = format!("{server_url}/api/v1/repos/{repo}/issues?state=open"); let net = config.net(); let response = net .get(url) .with_option(config.auth_token()) .some(|request, auth_token| request.header("Authorization", auth_token)) .send() .await?; let issues: HashSet = response.json().await?; Ok(issues) }