use reqwest::{header::ACCEPT, Error}; use serde::Deserialize; use crate::utils::get_reqwest_client; #[derive(Deserialize)] pub struct GithubResponse { pub total_count: u32, pub items: Vec, } #[derive(Deserialize)] pub struct GithubProject { pub title: String, pub html_url: String, pub number: u32, } pub async fn fetch_pr() -> Result { let client = get_reqwest_client(); client .get("https://api.github.com/search/issues?q=is:pr%20author:Mylloon") .header(ACCEPT, "application/vnd.github.text-match+json") .send() .await? .json::() .await }