diff --git a/Cargo.lock b/Cargo.lock index b69d739..c1a13bb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -392,7 +392,7 @@ dependencies = [ [[package]] name = "github-assistant" -version = "0.1.1" +version = "0.1.2" dependencies = [ "chrono", "crossterm 0.19.0", diff --git a/Cargo.toml b/Cargo.toml index 6a282a0..ff9dd15 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "github-assistant" -version = "0.1.1" +version = "0.1.2" edition = "2021" authors = ["simon Busch "] description = "Keep track of your github assignments" diff --git a/src/api/fetch_github_data.rs b/src/api/fetch_github_data.rs index 42b9559..0ac6ce4 100644 --- a/src/api/fetch_github_data.rs +++ b/src/api/fetch_github_data.rs @@ -39,15 +39,13 @@ pub async fn get_github_response(username: &str, access_token: &str, status: &st item.repository = Some(url_parts[url_parts.len() - 3].to_string()); item.organization = Some(url_parts[url_parts.len() - 4].to_string()); item.is_pr = url_parts.contains(&"pull"); - if item.state == "open" { - let comments_url = &item.comments_url; - let comments_response = client.get(comments_url).send().await?; - if !comments_response.status().is_success() { - println!("Error: {}", comments_response.status()); - } - let comments_json: Vec = comments_response.json().await?; - item.comments_list = comments_json; + let comments_url = &item.comments_url; + let comments_response = client.get(comments_url).send().await?; + if !comments_response.status().is_success() { + println!("Error: {}", comments_response.status()); } + let comments_json: Vec = comments_response.json().await?; + item.comments_list = comments_json; } Ok(items) } diff --git a/src/api/update_issue_status.rs b/src/api/update_issue_status.rs index fe8d468..1bd8d44 100644 --- a/src/api/update_issue_status.rs +++ b/src/api/update_issue_status.rs @@ -22,7 +22,7 @@ pub async fn update_issue_status(repo_owner: String, repo_name: String, issue_nu }.to_string(); let base_url = "https://api.github.com"; let patch_url = format!("{}/repos/{}/{}/issues/{}", base_url, repo_owner, repo_name, issue_number); - let response = client + let _response = client .patch(&patch_url) .header("Authorization", format!("token {}", access_token)) .header("Content-Type", "application/json") diff --git a/src/render_items/render_issues.rs b/src/render_items/render_issues.rs index cd5d467..359cd93 100644 --- a/src/render_items/render_issues.rs +++ b/src/render_items/render_issues.rs @@ -110,7 +110,7 @@ pub fn render_issues<'a>(issues: &Vec, selected_issue_index: Op ]), Row::new(vec![comments_cell]) .style(Style::default().fg(Color::White)) - .height(50), + .height(30), ]) .block( Block::default()