1
0
mirror of https://github.com/rust-unofficial/awesome-rust.git synced 2024-11-21 10:45:55 +02:00

Also look for travis.org as well as .com

This commit is contained in:
Tom Parker-Shemilt 2020-01-20 18:05:20 +00:00
parent f0af98f3fc
commit dec99f4416

View File

@ -121,7 +121,7 @@ fn get_url(url: String) -> BoxFuture<'static, (String, Result<String, CheckerErr
}
}
lazy_static! {
static ref TRAVIS_IMG_REGEX: Regex = Regex::new(r"https://api.travis-ci.com/[^/]+/.+\.svg").unwrap();
static ref TRAVIS_IMG_REGEX: Regex = Regex::new(r"https://api.travis-ci.(?:com|org)/[^/]+/.+\.svg").unwrap();
}
if TRAVIS_IMG_REGEX.is_match(&url) {
let content_dispostion = ok.headers().get(header::CONTENT_DISPOSITION).and_then(|h| h.to_str().ok()).unwrap_or("");