Skip to content

Commit

Permalink
Merge pull request #1245 from SRetip/readme_fix
Browse files Browse the repository at this point in the history
READY (willbe) : Readme fix
  • Loading branch information
Wandalen authored Mar 25, 2024
2 parents 4b6861b + 5241816 commit 51e6ef1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
14 changes: 8 additions & 6 deletions module/move/willbe/src/action/readme_health_table_renew.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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(),
}
}

Expand Down
15 changes: 13 additions & 2 deletions module/move/willbe/tests/inc/action/cicd_renew.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fn arrange( sample_dir : &str ) -> assert_fs::TempDir
struct Workflow
{
name : String,
on : String,
on : HashMap<String, HashMap<String, Vec<String>>>,
env : HashMap< String, String >,
jobs : HashMap< String, Job >,
}
Expand Down Expand Up @@ -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 ) ] ),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
Expand Down

0 comments on commit 51e6ef1

Please sign in to comment.