use upstream hubcaps

This commit is contained in:
Artturin 2022-11-15 12:14:04 +02:00 committed by Cole Helbling
parent d56502e692
commit 6ebf32f30a
11 changed files with 503 additions and 224 deletions

499
Cargo.lock generated
View file

@ -2,21 +2,6 @@
# It is not intended for manual editing. # It is not intended for manual editing.
version = 3 version = 3
[[package]]
name = "addr2line"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b"
dependencies = [
"gimli",
]
[[package]]
name = "adler"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
[[package]] [[package]]
name = "aho-corasick" name = "aho-corasick"
version = "0.7.19" version = "0.7.19"
@ -70,8 +55,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56987108bf48d2eb500cae8896cd9291564eedd8744776ecc5c3338a8b2ca5f8" checksum = "56987108bf48d2eb500cae8896cd9291564eedd8744776ecc5c3338a8b2ca5f8"
dependencies = [ dependencies = [
"amq-protocol-types", "amq-protocol-types",
"percent-encoding 2.2.0", "percent-encoding 2.1.0",
"url 2.3.1", "url 2.3.0",
] ]
[[package]] [[package]]
@ -83,12 +68,6 @@ dependencies = [
"libc", "libc",
] ]
[[package]]
name = "antidote"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34fde25430d87a9388dadbe6e34d7f72a462c8b43ac8d309b42b0a8505d7e2a5"
[[package]] [[package]]
name = "async-channel" name = "async-channel"
version = "1.7.1" version = "1.7.1"
@ -256,21 +235,6 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "backtrace"
version = "0.3.66"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cab84319d616cfb654d03394f38ab7e6f0919e181b1b57e1fd15e7fb4077d9a7"
dependencies = [
"addr2line",
"cc",
"cfg-if",
"libc",
"miniz_oxide",
"object",
"rustc-demangle",
]
[[package]] [[package]]
name = "base64" name = "base64"
version = "0.9.3" version = "0.9.3"
@ -281,6 +245,12 @@ dependencies = [
"safemem", "safemem",
] ]
[[package]]
name = "base64"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff"
[[package]] [[package]]
name = "base64" name = "base64"
version = "0.13.1" version = "0.13.1"
@ -337,6 +307,12 @@ version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
[[package]]
name = "bytes"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8"
[[package]] [[package]]
name = "cache-padded" name = "cache-padded"
version = "1.2.0" version = "1.2.0"
@ -521,6 +497,12 @@ dependencies = [
"syn", "syn",
] ]
[[package]]
name = "data-encoding"
version = "2.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ee2393c4a91429dffb4bedf19f4d6abf27d8a732c8ce4980305d782e5426d57"
[[package]] [[package]]
name = "des" name = "des"
version = "0.8.1" version = "0.8.1"
@ -554,12 +536,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797"
[[package]] [[package]]
name = "error-chain" name = "encoding_rs"
version = "0.10.0" version = "0.8.31"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9435d864e017c3c6afeac1654189b06cdb491cf2ff73dbf0d73b0f292f42ff8" checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b"
dependencies = [ dependencies = [
"backtrace", "cfg-if",
] ]
[[package]] [[package]]
@ -598,6 +580,12 @@ dependencies = [
"spin 0.9.4", "spin 0.9.4",
] ]
[[package]]
name = "fnv"
version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
[[package]] [[package]]
name = "foreign-types" name = "foreign-types"
version = "0.3.2" version = "0.3.2"
@ -615,23 +603,12 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
[[package]] [[package]]
name = "form_urlencoded" name = "form_urlencoded"
version = "1.1.0" version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191"
dependencies = [ dependencies = [
"percent-encoding 2.2.0", "matches",
] "percent-encoding 2.1.0",
[[package]]
name = "frank_jwt"
version = "3.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9febc9f09c7569636ba0e3d98a12addd6b11b3b3bc1d7baad06d52c60c1bbadd"
dependencies = [
"base64 0.13.1",
"openssl",
"serde",
"serde_json",
] ]
[[package]] [[package]]
@ -644,6 +621,20 @@ dependencies = [
"winapi", "winapi",
] ]
[[package]]
name = "futures"
version = "0.3.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0"
dependencies = [
"futures-channel",
"futures-core",
"futures-io",
"futures-sink",
"futures-task",
"futures-util",
]
[[package]] [[package]]
name = "futures-channel" name = "futures-channel"
version = "0.3.25" version = "0.3.25"
@ -651,6 +642,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed"
dependencies = [ dependencies = [
"futures-core", "futures-core",
"futures-sink",
] ]
[[package]] [[package]]
@ -711,6 +703,7 @@ checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6"
dependencies = [ dependencies = [
"futures-core", "futures-core",
"futures-macro", "futures-macro",
"futures-sink",
"futures-task", "futures-task",
"pin-project-lite", "pin-project-lite",
"pin-utils", "pin-utils",
@ -738,12 +731,6 @@ dependencies = [
"wasi 0.11.0+wasi-snapshot-preview1", "wasi 0.11.0+wasi-snapshot-preview1",
] ]
[[package]]
name = "gimli"
version = "0.26.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d"
[[package]] [[package]]
name = "gloo-timers" name = "gloo-timers"
version = "0.2.4" version = "0.2.4"
@ -756,6 +743,31 @@ dependencies = [
"wasm-bindgen", "wasm-bindgen",
] ]
[[package]]
name = "h2"
version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4"
dependencies = [
"bytes",
"fnv",
"futures-core",
"futures-sink",
"futures-util",
"http",
"indexmap",
"slab",
"tokio",
"tokio-util",
"tracing",
]
[[package]]
name = "hashbrown"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
[[package]] [[package]]
name = "hermit-abi" name = "hermit-abi"
version = "0.1.19" version = "0.1.19"
@ -774,25 +786,59 @@ dependencies = [
"digest", "digest",
] ]
[[package]]
name = "http"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399"
dependencies = [
"bytes",
"fnv",
"itoa",
]
[[package]]
name = "http-body"
version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1"
dependencies = [
"bytes",
"http",
"pin-project-lite",
]
[[package]] [[package]]
name = "httparse" name = "httparse"
version = "1.8.0" version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904"
[[package]]
name = "httpdate"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421"
[[package]] [[package]]
name = "hubcaps" name = "hubcaps"
version = "0.3.16" version = "0.6.2"
source = "git+https://github.com/grahamc/hubcaps.git#de1e1521ee78b5df5e1435619c8e1b90c932d36b" source = "git+https://github.com/softprops/hubcaps.git?rev=d60d157b6638760fc725b2e4e4f329a4ec6b901e#d60d157b6638760fc725b2e4e4f329a4ec6b901e"
dependencies = [ dependencies = [
"error-chain", "base64 0.13.1",
"frank_jwt", "data-encoding",
"hyper", "futures",
"log 0.3.9", "http",
"hyperx",
"jsonwebtoken",
"log 0.4.17",
"mime 0.3.16",
"percent-encoding 2.1.0",
"reqwest",
"serde", "serde",
"serde_derive", "serde_derive",
"serde_json", "serde_json",
"url 1.7.2", "url 2.3.0",
] ]
[[package]] [[package]]
@ -803,26 +849,68 @@ checksum = "0a0652d9a2609a968c14be1a9ea00bf4b1d64e2e1f53a1b51b6fff3a6e829273"
dependencies = [ dependencies = [
"base64 0.9.3", "base64 0.9.3",
"httparse", "httparse",
"language-tags", "language-tags 0.2.2",
"log 0.3.9", "log 0.3.9",
"mime", "mime 0.2.6",
"num_cpus", "num_cpus",
"time", "time",
"traitobject", "traitobject",
"typeable", "typeable",
"unicase", "unicase 1.4.2",
"url 1.7.2", "url 1.7.2",
] ]
[[package]] [[package]]
name = "hyper-native-tls" name = "hyper"
version = "0.3.0" version = "0.14.23"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d375598f442742b0e66208ee12501391f1c7ac0bafb90b4fe53018f81f06068" checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c"
dependencies = [ dependencies = [
"antidote", "bytes",
"hyper", "futures-channel",
"futures-core",
"futures-util",
"h2",
"http",
"http-body",
"httparse",
"httpdate",
"itoa",
"pin-project-lite",
"socket2",
"tokio",
"tower-service",
"tracing",
"want",
]
[[package]]
name = "hyper-tls"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"
dependencies = [
"bytes",
"hyper 0.14.23",
"native-tls", "native-tls",
"tokio",
"tokio-native-tls",
]
[[package]]
name = "hyperx"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5617e92fc2f2501c3e2bc6ce547cad841adba2bae5b921c7e52510beca6d084c"
dependencies = [
"base64 0.13.1",
"bytes",
"http",
"httpdate",
"language-tags 0.3.2",
"mime 0.3.16",
"percent-encoding 2.1.0",
"unicase 2.6.0",
] ]
[[package]] [[package]]
@ -862,14 +950,25 @@ dependencies = [
[[package]] [[package]]
name = "idna" name = "idna"
version = "0.3.0" version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8"
dependencies = [ dependencies = [
"matches",
"unicode-bidi", "unicode-bidi",
"unicode-normalization", "unicode-normalization",
] ]
[[package]]
name = "indexmap"
version = "1.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e"
dependencies = [
"autocfg",
"hashbrown",
]
[[package]] [[package]]
name = "inout" name = "inout"
version = "0.1.3" version = "0.1.3"
@ -889,6 +988,12 @@ dependencies = [
"cfg-if", "cfg-if",
] ]
[[package]]
name = "ipnet"
version = "2.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f88c5561171189e69df9d98bcf18fd5f9558300f7ea7b801eb8a0fd748bd8745"
[[package]] [[package]]
name = "itoa" name = "itoa"
version = "1.0.4" version = "1.0.4"
@ -904,6 +1009,20 @@ dependencies = [
"wasm-bindgen", "wasm-bindgen",
] ]
[[package]]
name = "jsonwebtoken"
version = "7.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "afabcc15e437a6484fc4f12d0fd63068fe457bf93f1c148d3d9649c60b103f32"
dependencies = [
"base64 0.12.3",
"pem",
"ring",
"serde",
"serde_json",
"simple_asn1",
]
[[package]] [[package]]
name = "kv-log-macro" name = "kv-log-macro"
version = "1.0.7" version = "1.0.7"
@ -919,6 +1038,12 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a"
[[package]]
name = "language-tags"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388"
[[package]] [[package]]
name = "lapin" name = "lapin"
version = "2.1.1" version = "2.1.1"
@ -1042,6 +1167,12 @@ dependencies = [
"log 0.3.9", "log 0.3.9",
] ]
[[package]]
name = "mime"
version = "0.3.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d"
[[package]] [[package]]
name = "minimal-lexical" name = "minimal-lexical"
version = "0.2.1" version = "0.2.1"
@ -1049,12 +1180,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]] [[package]]
name = "miniz_oxide" name = "mio"
version = "0.5.4" version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de"
dependencies = [ dependencies = [
"adler", "libc",
"log 0.4.17",
"wasi 0.11.0+wasi-snapshot-preview1",
"windows-sys 0.42.0",
] ]
[[package]] [[package]]
@ -1105,6 +1239,17 @@ dependencies = [
"winapi", "winapi",
] ]
[[package]]
name = "num-bigint"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304"
dependencies = [
"autocfg",
"num-integer",
"num-traits",
]
[[package]] [[package]]
name = "num-integer" name = "num-integer"
version = "0.1.45" version = "0.1.45"
@ -1126,23 +1271,14 @@ dependencies = [
[[package]] [[package]]
name = "num_cpus" name = "num_cpus"
version = "1.13.1" version = "1.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5"
dependencies = [ dependencies = [
"hermit-abi", "hermit-abi",
"libc", "libc",
] ]
[[package]]
name = "object"
version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53"
dependencies = [
"memchr",
]
[[package]] [[package]]
name = "ofborg" name = "ofborg"
version = "0.1.9" version = "0.1.9"
@ -1152,9 +1288,9 @@ dependencies = [
"either", "either",
"fs2", "fs2",
"futures-util", "futures-util",
"http",
"hubcaps", "hubcaps",
"hyper", "hyper 0.10.16",
"hyper-native-tls",
"lapin", "lapin",
"lru-cache", "lru-cache",
"md5", "md5",
@ -1282,6 +1418,17 @@ dependencies = [
"windows-sys 0.42.0", "windows-sys 0.42.0",
] ]
[[package]]
name = "pem"
version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd56cbd21fea48d0c440b41cd69c589faacade08c992d9a54e471b79d0fd13eb"
dependencies = [
"base64 0.13.1",
"once_cell",
"regex",
]
[[package]] [[package]]
name = "percent-encoding" name = "percent-encoding"
version = "1.0.1" version = "1.0.1"
@ -1290,9 +1437,9 @@ checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831"
[[package]] [[package]]
name = "percent-encoding" name = "percent-encoding"
version = "2.2.0" version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
[[package]] [[package]]
name = "pin-project" name = "pin-project"
@ -1440,6 +1587,43 @@ dependencies = [
"winapi", "winapi",
] ]
[[package]]
name = "reqwest"
version = "0.11.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "431949c384f4e2ae07605ccaa56d1d9d2ecdb5cadd4f9577ccfab29f2e5149fc"
dependencies = [
"base64 0.13.1",
"bytes",
"encoding_rs",
"futures-core",
"futures-util",
"h2",
"http",
"http-body",
"hyper 0.14.23",
"hyper-tls",
"ipnet",
"js-sys",
"log 0.4.17",
"mime 0.3.16",
"native-tls",
"once_cell",
"percent-encoding 2.1.0",
"pin-project-lite",
"serde",
"serde_json",
"serde_urlencoded",
"tokio",
"tokio-native-tls",
"tower-service",
"url 2.3.0",
"wasm-bindgen",
"wasm-bindgen-futures",
"web-sys",
"winreg",
]
[[package]] [[package]]
name = "ring" name = "ring"
version = "0.16.20" version = "0.16.20"
@ -1455,12 +1639,6 @@ dependencies = [
"winapi", "winapi",
] ]
[[package]]
name = "rustc-demangle"
version = "0.1.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342"
[[package]] [[package]]
name = "rustls" name = "rustls"
version = "0.20.7" version = "0.20.7"
@ -1610,6 +1788,18 @@ dependencies = [
"serde", "serde",
] ]
[[package]]
name = "serde_urlencoded"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
dependencies = [
"form_urlencoded",
"itoa",
"ryu",
"serde",
]
[[package]] [[package]]
name = "sha1" name = "sha1"
version = "0.10.5" version = "0.10.5"
@ -1649,6 +1839,17 @@ dependencies = [
"libc", "libc",
] ]
[[package]]
name = "simple_asn1"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "692ca13de57ce0613a363c8c2f1de925adebc81b04c923ac60c5488bb44abe4b"
dependencies = [
"chrono",
"num-bigint",
"num-traits",
]
[[package]] [[package]]
name = "slab" name = "slab"
version = "0.4.7" version = "0.4.7"
@ -1786,6 +1987,52 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
[[package]]
name = "tokio"
version = "1.21.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a9e03c497dc955702ba729190dc4aac6f2a0ce97f913e5b1b5912fc5039d9099"
dependencies = [
"autocfg",
"bytes",
"libc",
"memchr",
"mio",
"pin-project-lite",
"socket2",
"winapi",
]
[[package]]
name = "tokio-native-tls"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b"
dependencies = [
"native-tls",
"tokio",
]
[[package]]
name = "tokio-util"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740"
dependencies = [
"bytes",
"futures-core",
"futures-sink",
"pin-project-lite",
"tokio",
"tracing",
]
[[package]]
name = "tower-service"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52"
[[package]] [[package]]
name = "tracing" name = "tracing"
version = "0.1.37" version = "0.1.37"
@ -1867,6 +2114,12 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" checksum = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079"
[[package]]
name = "try-lock"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642"
[[package]] [[package]]
name = "typeable" name = "typeable"
version = "0.1.2" version = "0.1.2"
@ -1888,6 +2141,15 @@ dependencies = [
"version_check 0.1.5", "version_check 0.1.5",
] ]
[[package]]
name = "unicase"
version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6"
dependencies = [
"version_check 0.9.4",
]
[[package]] [[package]]
name = "unicode-bidi" name = "unicode-bidi"
version = "0.3.8" version = "0.3.8"
@ -1934,13 +2196,13 @@ dependencies = [
[[package]] [[package]]
name = "url" name = "url"
version = "2.3.1" version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" checksum = "22fe195a4f217c25b25cb5058ced57059824a678474874038dc88d211bf508d3"
dependencies = [ dependencies = [
"form_urlencoded", "form_urlencoded",
"idna 0.3.0", "idna 0.2.3",
"percent-encoding 2.2.0", "percent-encoding 2.1.0",
] ]
[[package]] [[package]]
@ -1992,6 +2254,16 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca"
[[package]]
name = "want"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"
dependencies = [
"log 0.4.17",
"try-lock",
]
[[package]] [[package]]
name = "wasi" name = "wasi"
version = "0.10.0+wasi-snapshot-preview1" version = "0.10.0+wasi-snapshot-preview1"
@ -2230,6 +2502,15 @@ version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5"
[[package]]
name = "winreg"
version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d"
dependencies = [
"winapi",
]
[[package]] [[package]]
name = "yasna" name = "yasna"
version = "0.5.0" version = "0.5.0"

View file

@ -113,7 +113,7 @@
cargoLock = { cargoLock = {
lockFile = ./Cargo.lock; lockFile = ./Cargo.lock;
outputHashes = { outputHashes = {
"hubcaps-0.3.16" = "sha256-/BFXGccu27K8heK4IL7JnS/U7zatTk9wRybhtxppADM="; "hubcaps-0.6.2" = "sha256-yyHOCxUsehvtYfttRY4T9TDrJhSKGpJRa/SX3Sd1TNc=";
}; };
}; };
}; };

View file

@ -11,12 +11,13 @@ chrono = "0.4.22"
either = "1.8.0" either = "1.8.0"
fs2 = "0.4.3" fs2 = "0.4.3"
futures-util = "0.3.25" futures-util = "0.3.25"
hubcaps = { git = "https://github.com/grahamc/hubcaps.git" } #hubcaps = "0.6"
#hubcaps = { path = "../../../grahamc/hubcaps/" } # for testing patches # for Conclusion::Skipped which is in master
# to upgrade hyper, hubcaps has to be updated too hubcaps = { git = "https://github.com/softprops/hubcaps.git", rev = "d60d157b6638760fc725b2e4e4f329a4ec6b901e" }
# newer hyper has hyper::StatusCode while hubcaps returns a hyper::status::StatusCode # hyper = { version = "0.14", features = ["full"] }
hyper = "=0.10.*" hyper = "=0.10.*"
hyper-native-tls = "0.3.0" # maybe can be removed when hyper is updated
http = "0.2"
lapin = "2.1.1" lapin = "2.1.1"
lru-cache = "0.1.2" lru-cache = "0.1.2"
md5 = "0.7.0" md5 = "0.7.0"

View file

@ -1,21 +1,22 @@
use futures_util::future::TryFutureExt;
use tracing::warn; use tracing::warn;
pub struct CommitStatus<'a> { pub struct CommitStatus {
api: hubcaps::statuses::Statuses<'a>, api: hubcaps::statuses::Statuses,
sha: String, sha: String,
context: String, context: String,
description: String, description: String,
url: String, url: String,
} }
impl<'a> CommitStatus<'a> { impl CommitStatus {
pub fn new( pub fn new(
api: hubcaps::statuses::Statuses<'a>, api: hubcaps::statuses::Statuses,
sha: String, sha: String,
context: String, context: String,
description: String, description: String,
url: Option<String>, url: Option<String>,
) -> CommitStatus<'a> { ) -> CommitStatus {
let mut stat = CommitStatus { let mut stat = CommitStatus {
api, api,
sha, sha,
@ -56,7 +57,7 @@ impl<'a> CommitStatus<'a> {
} else { } else {
self.description.clone() self.description.clone()
}; };
async_std::task::block_on(
self.api self.api
.create( .create(
self.sha.as_ref(), self.sha.as_ref(),
@ -66,8 +67,9 @@ impl<'a> CommitStatus<'a> {
.target_url(self.url.clone()) .target_url(self.url.clone())
.build(), .build(),
) )
.map(|_| ()) .map_ok(|_| ())
.map_err(|e| CommitStatusError::from(e)) .map_err(|e| CommitStatusError::from(e)),
)
} }
} }
@ -80,15 +82,16 @@ pub enum CommitStatusError {
impl From<hubcaps::Error> for CommitStatusError { impl From<hubcaps::Error> for CommitStatusError {
fn from(e: hubcaps::Error) -> CommitStatusError { fn from(e: hubcaps::Error) -> CommitStatusError {
use hyper::status::StatusCode; use http::status::StatusCode;
match e.kind() { use hubcaps::Error;
hubcaps::ErrorKind::Fault { code, error } match &e {
if code == &StatusCode::Unauthorized && error.message == "Bad credentials" => Error::Fault { code, error }
if code == &StatusCode::UNAUTHORIZED && error.message == "Bad credentials" =>
{ {
CommitStatusError::ExpiredCreds(e) CommitStatusError::ExpiredCreds(e)
} }
hubcaps::ErrorKind::Fault { code, error } Error::Fault { code, error }
if code == &StatusCode::UnprocessableEntity if code == &StatusCode::UNPROCESSABLE_ENTITY
&& error.message.starts_with("No commit found for SHA:") => && error.message.starts_with("No commit found for SHA:") =>
{ {
CommitStatusError::MissingSha(e) CommitStatusError::MissingSha(e)

View file

@ -9,9 +9,6 @@ use std::marker::PhantomData;
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use hubcaps::{Credentials, Github, InstallationTokenGenerator, JWTCredentials}; use hubcaps::{Credentials, Github, InstallationTokenGenerator, JWTCredentials};
use hyper::net::HttpsConnector;
use hyper::Client;
use hyper_native_tls::NativeTlsClient;
use serde::de::{self, Deserialize, Deserializer}; use serde::de::{self, Deserialize, Deserializer};
use tracing::{debug, error, info, warn}; use tracing::{debug, error, info, warn};
@ -57,8 +54,8 @@ pub struct GithubConfig {
#[derive(Serialize, Deserialize, Debug, Clone)] #[derive(Serialize, Deserialize, Debug, Clone)]
pub struct GithubAppConfig { pub struct GithubAppConfig {
pub app_id: i32, pub app_id: u64,
pub installation_id: i32, pub installation_id: u64,
pub private_key: PathBuf, pub private_key: PathBuf,
} }
@ -119,9 +116,9 @@ impl Config {
Github::new( Github::new(
"github.com/grahamc/ofborg", "github.com/grahamc/ofborg",
// tls configured hyper client // tls configured hyper client
Client::with_connector(HttpsConnector::new(NativeTlsClient::new().unwrap())),
Credentials::Token(self.github.clone().unwrap().token), Credentials::Token(self.github.clone().unwrap().token),
) )
.unwrap()
} }
pub fn github_app_vendingmachine(&self) -> GithubAppVendingMachine { pub fn github_app_vendingmachine(&self) -> GithubAppVendingMachine {
@ -176,8 +173,8 @@ pub fn load(filename: &Path) -> Config {
pub struct GithubAppVendingMachine { pub struct GithubAppVendingMachine {
conf: GithubAppConfig, conf: GithubAppConfig,
id_cache: HashMap<(String, String), Option<i32>>, id_cache: HashMap<(String, String), Option<u64>>,
client_cache: HashMap<i32, Github>, client_cache: HashMap<u64, Github>,
} }
impl GithubAppVendingMachine { impl GithubAppVendingMachine {
@ -186,10 +183,12 @@ impl GithubAppVendingMachine {
} }
fn jwt(&self) -> JWTCredentials { fn jwt(&self) -> JWTCredentials {
JWTCredentials::new(self.conf.app_id, self.conf.private_key.clone()) // JWTCredentials::new(self.conf.app_id, self.conf.private_key.clone())
// FIXME: upstream wants raw bytes of private key
JWTCredentials::new(self.conf.app_id, vec![0x00]).unwrap()
} }
fn install_id_for_repo(&mut self, owner: &str, repo: &str) -> Option<i32> { fn install_id_for_repo(&mut self, owner: &str, repo: &str) -> Option<u64> {
let useragent = self.useragent(); let useragent = self.useragent();
let jwt = self.jwt(); let jwt = self.jwt();
@ -198,13 +197,9 @@ impl GithubAppVendingMachine {
*self.id_cache.entry(key).or_insert_with(|| { *self.id_cache.entry(key).or_insert_with(|| {
info!("Looking up install ID for {}/{}", owner, repo); info!("Looking up install ID for {}/{}", owner, repo);
let lookup_gh = Github::new( let lookup_gh = Github::new(useragent, Credentials::JWT(jwt)).unwrap();
useragent,
Client::with_connector(HttpsConnector::new(NativeTlsClient::new().unwrap())),
Credentials::JWT(jwt),
);
match lookup_gh.app().find_repo_installation(owner, repo) { match async_std::task::block_on(lookup_gh.app().find_repo_installation(owner, repo)) {
Ok(install_id) => { Ok(install_id) => {
debug!("Received install ID {:?}", install_id); debug!("Received install ID {:?}", install_id);
Some(install_id.id) Some(install_id.id)
@ -225,9 +220,9 @@ impl GithubAppVendingMachine {
Some(self.client_cache.entry(install_id).or_insert_with(|| { Some(self.client_cache.entry(install_id).or_insert_with(|| {
Github::new( Github::new(
useragent, useragent,
Client::with_connector(HttpsConnector::new(NativeTlsClient::new().unwrap())),
Credentials::InstallationToken(InstallationTokenGenerator::new(install_id, jwt)), Credentials::InstallationToken(InstallationTokenGenerator::new(install_id, jwt)),
) )
.unwrap()
})) }))
} }
} }

View file

@ -67,8 +67,7 @@ mod tests {
fn test_parse_changed_base() { fn test_parse_changed_base() {
let data = include_str!("../../test-srcs/events/pr-changed-base.json"); let data = include_str!("../../test-srcs/events/pr-changed-base.json");
let pr: PullRequestEvent = let pr: PullRequestEvent = serde_json::from_str(data).expect("Should properly deserialize");
serde_json::from_str(data).expect("Should properly deserialize");
assert_eq!(pr.action, PullRequestAction::Edited); assert_eq!(pr.action, PullRequestAction::Edited);
} }
@ -76,8 +75,7 @@ mod tests {
fn test_parse_unknown_action() { fn test_parse_unknown_action() {
let data = include_str!("../../test-srcs/events/pr-converted-to-draft.json"); let data = include_str!("../../test-srcs/events/pr-converted-to-draft.json");
let pr: PullRequestEvent = let pr: PullRequestEvent = serde_json::from_str(data).expect("Should properly deserialize");
serde_json::from_str(data).expect("Should properly deserialize");
assert_eq!(pr.action, PullRequestAction::Unknown); assert_eq!(pr.action, PullRequestAction::Unknown);
} }
} }

View file

@ -409,7 +409,6 @@ mod tests {
let cloner = checkout::cached_cloner(path); let cloner = checkout::cached_cloner(path);
let nix = nix(); let nix = nix();
BuildWorker::new( BuildWorker::new(
cloner, cloner,
nix, nix,
@ -462,8 +461,12 @@ mod tests {
false false
} }
}) })
.unwrap_or_else(|| panic!("Actions should contain a job matching {}, after the previous check", .unwrap_or_else(|| {
text_to_match)); panic!(
"Actions should contain a job matching {}, after the previous check",
text_to_match
)
});
} }
#[test] #[test]

View file

@ -49,11 +49,11 @@ fn label_from_title(title: &str) -> Vec<String> {
pub struct NixpkgsStrategy<'a> { pub struct NixpkgsStrategy<'a> {
job: &'a EvaluationJob, job: &'a EvaluationJob,
pull: &'a hubcaps::pulls::PullRequest<'a>, pull: &'a hubcaps::pulls::PullRequest,
issue: &'a Issue, issue: &'a Issue,
issue_ref: &'a IssueRef<'a>, issue_ref: &'a IssueRef,
repo: &'a Repository<'a>, repo: &'a Repository,
gists: &'a Gists<'a>, gists: &'a Gists,
nix: Nix, nix: Nix,
stdenv_diff: Option<Stdenvs>, stdenv_diff: Option<Stdenvs>,
outpath_diff: Option<OutPathDiff>, outpath_diff: Option<OutPathDiff>,
@ -88,7 +88,7 @@ impl<'a> NixpkgsStrategy<'a> {
} }
fn tag_from_title(&self) { fn tag_from_title(&self) {
let title = match self.issue_ref.get() { let title = match async_std::task::block_on(self.issue_ref.get()) {
Ok(issue) => issue.title.to_lowercase(), Ok(issue) => issue.title.to_lowercase(),
Err(_) => return, Err(_) => return,
}; };
@ -254,12 +254,8 @@ impl<'a> NixpkgsStrategy<'a> {
.collect::<Vec<Vec<&str>>>(); .collect::<Vec<Vec<&str>>>();
if let Some(ref changed_paths) = self.changed_paths { if let Some(ref changed_paths) = self.changed_paths {
let m = ImpactedMaintainers::calculate( let m =
&self.nix, ImpactedMaintainers::calculate(&self.nix, dir, changed_paths, &changed_attributes);
dir,
changed_paths,
&changed_attributes,
);
let gist_url = make_gist( let gist_url = make_gist(
self.gists, self.gists,
@ -587,7 +583,7 @@ impl<'a> EvaluationStrategy for NixpkgsStrategy<'a> {
} }
fn request_reviews(maint: &maintainers::ImpactedMaintainers, pull: &hubcaps::pulls::PullRequest) { fn request_reviews(maint: &maintainers::ImpactedMaintainers, pull: &hubcaps::pulls::PullRequest) {
let pull_meta = pull.get(); let pull_meta = async_std::task::block_on(pull.get());
info!("Impacted maintainers: {:?}", maint.maintainers()); info!("Impacted maintainers: {:?}", maint.maintainers());
if maint.maintainers().len() < 10 { if maint.maintainers().len() < 10 {
@ -605,13 +601,12 @@ fn request_reviews(maint: &maintainers::ImpactedMaintainers, pull: &hubcaps::pul
} }
} }
if let Err(e) = if let Err(e) = async_std::task::block_on(pull.review_requests().create(
pull.review_requests() &hubcaps::review_requests::ReviewRequestOptions {
.create(&hubcaps::review_requests::ReviewRequestOptions {
reviewers: vec![maintainer.clone()], reviewers: vec![maintainer.clone()],
team_reviewers: vec![], team_reviewers: vec![],
}) },
{ )) {
warn!("Failure requesting a review from {}: {:?}", maintainer, e,); warn!("Failure requesting a review from {}: {:?}", maintainer, e,);
} }
} }

View file

@ -10,6 +10,7 @@ use crate::stats::{self, Event};
use crate::systems; use crate::systems;
use crate::tasks::eval; use crate::tasks::eval;
use crate::worker; use crate::worker;
use futures_util::TryFutureExt;
use std::collections::HashMap; use std::collections::HashMap;
use std::path::Path; use std::path::Path;
@ -105,8 +106,8 @@ impl<E: stats::SysEvents + 'static> worker::SimpleWorker for EvaluationWorker<E>
struct OneEval<'a, E> { struct OneEval<'a, E> {
client_app: &'a hubcaps::Github, client_app: &'a hubcaps::Github,
repo: hubcaps::repositories::Repository<'a>, repo: hubcaps::repositories::Repository,
gists: Gists<'a>, gists: Gists,
nix: &'a nix::Nix, nix: &'a nix::Nix,
acl: &'a Acl, acl: &'a Acl,
events: &'a mut E, events: &'a mut E,
@ -180,11 +181,13 @@ impl<'a, E: stats::SysEvents + 'static> OneEval<'a, E> {
&self.job.pr.number, &self.job.pr.head_sha, &description &self.job.pr.number, &self.job.pr.head_sha, &description
); );
async_std::task::block_on(
self.repo self.repo
.statuses() .statuses()
.create(&self.job.pr.head_sha, &builder.build()) .create(&self.job.pr.head_sha, &builder.build())
.map(|_| ()) .map_ok(|_| ())
.map_err(|e| CommitStatusError::from(e)) .map_err(|e| CommitStatusError::from(e)),
)
} }
fn make_gist( fn make_gist(
@ -259,7 +262,7 @@ impl<'a, E: stats::SysEvents + 'static> OneEval<'a, E> {
let issue: Issue; let issue: Issue;
let auto_schedule_build_archs: Vec<systems::System>; let auto_schedule_build_archs: Vec<systems::System>;
match issue_ref.get() { match async_std::task::block_on(issue_ref.get()) {
Ok(iss) => { Ok(iss) => {
if iss.state == "closed" { if iss.state == "closed" {
self.events.notify(Event::IssueAlreadyClosed); self.events.notify(Event::IssueAlreadyClosed);
@ -465,7 +468,7 @@ impl<'a, E: stats::SysEvents + 'static> OneEval<'a, E> {
fn send_check_statuses(checks: Vec<CheckRunOptions>, repo: &hubcaps::repositories::Repository) { fn send_check_statuses(checks: Vec<CheckRunOptions>, repo: &hubcaps::repositories::Repository) {
for check in checks { for check in checks {
match repo.checkruns().create(&check) { match async_std::task::block_on(repo.checkruns().create(&check)) {
Ok(_) => debug!("Sent check update"), Ok(_) => debug!("Sent check update"),
Err(e) => warn!("Failed to send check update: {:?}", e), Err(e) => warn!("Failed to send check update: {:?}", e),
} }
@ -504,8 +507,8 @@ fn schedule_builds(
response response
} }
pub fn make_gist<'a>( pub fn make_gist(
gists: &hubcaps::gists::Gists<'a>, gists: &hubcaps::gists::Gists,
name: &str, name: &str,
description: Option<String>, description: Option<String>,
contents: String, contents: String,
@ -520,12 +523,11 @@ pub fn make_gist<'a>(
); );
Some( Some(
gists async_std::task::block_on(gists.create(&hubcaps::gists::GistOptions {
.create(&hubcaps::gists::GistOptions {
description, description,
public: Some(true), public: Some(true),
files, files,
}) }))
.expect("Failed to create gist!") .expect("Failed to create gist!")
.html_url, .html_url,
) )
@ -533,7 +535,7 @@ pub fn make_gist<'a>(
pub fn update_labels(issueref: &hubcaps::issues::IssueRef, add: &[String], remove: &[String]) { pub fn update_labels(issueref: &hubcaps::issues::IssueRef, add: &[String], remove: &[String]) {
let l = issueref.labels(); let l = issueref.labels();
let issue = issueref.get().expect("Failed to get issue"); let issue = async_std::task::block_on(issueref.get()).expect("Failed to get issue");
let existing: Vec<String> = issue.labels.iter().map(|l| l.name.clone()).collect(); let existing: Vec<String> = issue.labels.iter().map(|l| l.name.clone()).collect();
@ -554,7 +556,7 @@ pub fn update_labels(issueref: &hubcaps::issues::IssueRef, add: &[String], remov
issue.number, to_add, to_remove, existing issue.number, to_add, to_remove, existing
); );
l.add(to_add.clone()).unwrap_or_else(|e| { async_std::task::block_on(l.add(to_add.clone())).unwrap_or_else(|e| {
panic!( panic!(
"Failed to add labels {:?} to issue #{}: {:?}", "Failed to add labels {:?} to issue #{}: {:?}",
to_add, issue.number, e to_add, issue.number, e
@ -562,7 +564,7 @@ pub fn update_labels(issueref: &hubcaps::issues::IssueRef, add: &[String], remov
}); });
for label in to_remove { for label in to_remove {
l.remove(&label).unwrap_or_else(|e| { async_std::task::block_on(l.remove(&label)).unwrap_or_else(|e| {
panic!( panic!(
"Failed to remove label {:?} from issue #{}: {:?}", "Failed to remove label {:?} from issue #{}: {:?}",
label, issue.number, e label, issue.number, e
@ -604,12 +606,11 @@ fn indicates_wip(text: &str) -> bool {
/// that (e.g. if someone used `@ofborg eval`, `@ofborg build`, `@ofborg test`). /// that (e.g. if someone used `@ofborg eval`, `@ofborg build`, `@ofborg test`).
/// Otherwise, if it's a new PR or was recently force-pushed (and therefore /// Otherwise, if it's a new PR or was recently force-pushed (and therefore
/// doesn't have any old `grahamcofborg`-prefixed statuses), use the new prefix. /// doesn't have any old `grahamcofborg`-prefixed statuses), use the new prefix.
pub fn get_prefix<'a>( pub fn get_prefix(
statuses: hubcaps::statuses::Statuses, statuses: hubcaps::statuses::Statuses,
sha: &'a str, sha: &str,
) -> Result<&'a str, CommitStatusError> { ) -> Result<&str, CommitStatusError> {
if statuses if async_std::task::block_on(statuses.list(sha))?
.list(sha)?
.iter() .iter()
.any(|s| s.context.starts_with("grahamcofborg-")) .any(|s| s.context.starts_with("grahamcofborg-"))
{ {

View file

@ -65,15 +65,16 @@ impl worker::SimpleWorker for GitHubCommentWorker {
let instructions = commentparser::parse(&job.comment.body); let instructions = commentparser::parse(&job.comment.body);
info!("Instructions: {:?}", instructions); info!("Instructions: {:?}", instructions);
let pr = self let pr = async_std::task::block_on(
.github self.github
.repo( .repo(
job.repository.owner.login.clone(), job.repository.owner.login.clone(),
job.repository.name.clone(), job.repository.name.clone(),
) )
.pulls() .pulls()
.get(job.issue.number) .get(job.issue.number)
.get(); .get(),
);
if let Err(x) = pr { if let Err(x) = pr {
info!( info!(

View file

@ -78,13 +78,14 @@ impl worker::SimpleWorker for GitHubCommentPoster {
); );
debug!("{:?}", check); debug!("{:?}", check);
let check_create_attempt = self let check_create_attempt = async_std::task::block_on(
.github_vend self.github_vend
.for_repo(&repo.owner, &repo.name) .for_repo(&repo.owner, &repo.name)
.unwrap() .unwrap()
.repo(repo.owner.clone(), repo.name.clone()) .repo(repo.owner.clone(), repo.name.clone())
.checkruns() .checkruns()
.create(&check); .create(&check),
);
match check_create_attempt { match check_create_attempt {
Ok(_) => info!("Successfully sent."), Ok(_) => info!("Successfully sent."),