Explorar o código

Update octocrab

This removes a dependency on hyperx which has dependency requirements
that can cause unresolvable errors when adding new dependencies.
bjorn3 hai 1 ano
pai
achega
9d5fe9cb1c
Modificáronse 3 ficheiros con 373 adicións e 123 borrados
  1. 368 118
      Cargo.lock
  2. 1 1
      Cargo.toml
  3. 4 4
      src/triage.rs

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 368 - 118
Cargo.lock


+ 1 - 1
Cargo.toml

@@ -33,7 +33,7 @@ tokio-postgres = { version = "0.7.2", features = ["with-chrono-0_4", "with-serde
 postgres-native-tls = "0.5.0"
 native-tls = "0.2"
 serde_path_to_error = "0.1.2"
-octocrab = "0.9.1"
+octocrab = "0.30.1"
 comrak = { version = "0.8.2", default-features = false }
 route-recognizer = "0.3.0"
 cynic = { version = "2.0.0" }

+ 4 - 4
src/triage.rs

@@ -68,7 +68,7 @@ pub async fn pulls(
         let days_from_last_updated_at = if let Some(updated_at) = base_pull.updated_at {
             (Utc::now() - updated_at).num_days()
         } else {
-            (Utc::now() - base_pull.created_at).num_days()
+            (Utc::now() - base_pull.created_at.unwrap()).num_days()
         };
 
         let labels = base_pull.labels.map_or("".to_string(), |labels| {
@@ -80,10 +80,10 @@ pub async fn pulls(
         });
         let wait_for_author = labels.contains("S-waiting-on-author");
         let wait_for_review = labels.contains("S-waiting-on-review");
-        let html_url = base_pull.html_url;
+        let html_url = base_pull.html_url.unwrap();
         let number = base_pull.number;
-        let title = base_pull.title;
-        let author = base_pull.user.login;
+        let title = base_pull.title.unwrap();
+        let author = base_pull.user.unwrap().login;
 
         let pull = PullRequest {
             html_url,

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio