diff --git a/module/move/willbe/src/action/readme_health_table_renew.rs b/module/move/willbe/src/action/readme_health_table_renew.rs index 77f9e17958..e6ebfe34f9 100644 --- a/module/move/willbe/src/action/readme_health_table_renew.rs +++ b/module/move/willbe/src/action/readme_health_table_renew.rs @@ -367,7 +367,9 @@ mod private let mut rou = format!( "| [{}]({}/{}) |", &module_name, &table_parameters.base_path, &module_name ); if table_parameters.include_stability { - rou.push_str( &stability_generate( &stability.as_ref().unwrap() ) ); + let mut stability = stability_generate( &stability.as_ref().unwrap() ); + stability.push_str( " |" ); + rou.push_str( &stability ); } if parameters.branches.is_some() && table_parameters.include_branches { @@ -389,11 +391,11 @@ mod private { match stability { - Stability::Experimental => " [![experimental](https://raster.shields.io/static/v1?label=&message=experimental&color=orange)](https://github.com/emersion/stability-badges#experimental) |".into(), - Stability::Stable => " [![stability-stable](https://img.shields.io/badge/stability-stable-green.svg)](https://github.com/emersion/stability-badges#stable) |".into(), - Stability::Deprecated => " [![stability-deprecated](https://img.shields.io/badge/stability-deprecated-red.svg)](https://github.com/emersion/stability-badges#deprecated) |".into(), - Stability::Unstable => " [![stability-unstable](https://img.shields.io/badge/stability-unstable-yellow.svg)](https://github.com/emersion/stability-badges#unstable) |".into(), - Stability::Frozen => " [![stability-frozen](https://img.shields.io/badge/stability-frozen-blue.svg)](https://github.com/emersion/stability-badges#frozen) |".into(), + Stability::Experimental => " [![experimental](https://raster.shields.io/static/v1?label=&message=experimental&color=orange)](https://github.com/emersion/stability-badges#experimental)".into(), + Stability::Stable => " [![stability-stable](https://img.shields.io/badge/stability-stable-green.svg)](https://github.com/emersion/stability-badges#stable)".into(), + Stability::Deprecated => " [![stability-deprecated](https://img.shields.io/badge/stability-deprecated-red.svg)](https://github.com/emersion/stability-badges#deprecated)".into(), + Stability::Unstable => " [![stability-unstable](https://img.shields.io/badge/stability-unstable-yellow.svg)](https://github.com/emersion/stability-badges#unstable)".into(), + Stability::Frozen => " [![stability-frozen](https://img.shields.io/badge/stability-frozen-blue.svg)](https://github.com/emersion/stability-badges#frozen)".into(), } } diff --git a/module/move/willbe/tests/inc/action/cicd_renew.rs b/module/move/willbe/tests/inc/action/cicd_renew.rs index 497e08b1b4..ddd92bb908 100644 --- a/module/move/willbe/tests/inc/action/cicd_renew.rs +++ b/module/move/willbe/tests/inc/action/cicd_renew.rs @@ -31,7 +31,7 @@ fn arrange( sample_dir : &str ) -> assert_fs::TempDir struct Workflow { name : String, - on : String, + on : HashMap>>, env : HashMap< String, String >, jobs : HashMap< String, Job >, } @@ -72,7 +72,18 @@ fn default_case() let expected = Workflow { name : "test_module".into(), - on : "push".into(), + on : + { + let mut map = HashMap::new(); + let mut push_map = HashMap::new(); + push_map.insert + ( + "branches-ignore".to_string(), + vec![ "alpha".to_string(), "beta".to_string(), "master".to_string() ], + ); + map.insert( "push".to_string(), push_map ); + map + }, env : HashMap::from_iter( [ ( "CARGO_TERM_COLOR".to_string(), "always".to_string() ) ] ), jobs : HashMap::from_iter( [ ( "test".to_string(), job ) ] ), }; diff --git a/module/move/willbe/tests/inc/action/readme_modules_headers_renew.rs b/module/move/willbe/tests/inc/action/readme_modules_headers_renew.rs index df61049bf9..3b731914bb 100644 --- a/module/move/willbe/tests/inc/action/readme_modules_headers_renew.rs +++ b/module/move/willbe/tests/inc/action/readme_modules_headers_renew.rs @@ -56,6 +56,7 @@ fn default_stability() // Assert assert!( actual.contains( "[![experimental](https://raster.shields.io/static/v1?label=&message=experimental&color=orange)](https://github.com/emersion/stability-badges#experimental)" ) ); + assert!( !actual.contains( "|" ) ); } #[ test ]