mirror of
https://github.com/rust-unofficial/awesome-rust
synced 2024-11-22 11:53:06 +00:00
Merge branch 'master' into master
This commit is contained in:
commit
0cc078a474
2 changed files with 1 additions and 15 deletions
|
@ -15,7 +15,7 @@ If you want to add an entry to the `README.md` please consider this:
|
|||
* if you've not published your crate to `crates.io` remove the `[[CRATE](...)]` part.
|
||||
* if you have a CI build, please add the build badge. Put the image after the description, separated by a space. Please make sure to add the branch information to the image:
|
||||
* example for Travis: ` [<img src="https://api.travis-ci.org/XXX/CRATE.svg?branch=master">](https://travis-ci.org/XXX/CRATE)`
|
||||
* for Github actions please see https://docs.github.com/en/free-pro-team@latest/actions/managing-workflow-runs/adding-a-workflow-status-badge#using-the-branch-parameter
|
||||
* for Github actions please see https://docs.github.com/en/actions/managing-workflow-runs/adding-a-workflow-status-badge
|
||||
- please pay attention to the alphabetical ordering.
|
||||
|
||||
|
||||
|
|
14
src/main.rs
14
src/main.rs
|
@ -39,9 +39,6 @@ enum CheckerError {
|
|||
|
||||
#[fail(display = "travis build image with no branch")]
|
||||
TravisBuildNoBranch,
|
||||
|
||||
#[fail(display = "github actions image with no branch")]
|
||||
GithubActionNoBranch,
|
||||
}
|
||||
|
||||
fn formatter(err: &CheckerError, url: &String) -> String {
|
||||
|
@ -62,9 +59,6 @@ fn formatter(err: &CheckerError, url: &String) -> String {
|
|||
CheckerError::TravisBuildNoBranch => {
|
||||
format!("[Travis build image with no branch specified] {}", url)
|
||||
}
|
||||
CheckerError::GithubActionNoBranch => {
|
||||
format!("[Github action image with no branch specified] {}", url)
|
||||
}
|
||||
_ => {
|
||||
format!("{:?}", err)
|
||||
}
|
||||
|
@ -227,14 +221,6 @@ fn get_url_core(url: String) -> BoxFuture<'static, (String, Result<(), CheckerEr
|
|||
break;
|
||||
}
|
||||
}
|
||||
if let Some(matches) = GITHUB_ACTIONS_REGEX.captures(&url) {
|
||||
debug!("Github actions match {:?}", matches);
|
||||
let query = matches.get(1).map(|x| x.as_str()).unwrap_or("");
|
||||
if !query.starts_with("?") || query.find("branch=").is_none() {
|
||||
res = Err(CheckerError::GithubActionNoBranch);
|
||||
break;
|
||||
}
|
||||
}
|
||||
debug!("Finished {}", url);
|
||||
res = Ok(());
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue