@@ -95,6 +95,13 @@ pub fn validate_config(
9595 ) ) ;
9696 }
9797
98+ if conf. description . is_empty ( ) {
99+ return Err ( OsedaCheckError :: MissingDescription (
100+ "Description is missing or empty. Please update the oseda-config.json" . to_owned ( ) ,
101+ ) )
102+ }
103+
104+
98105 Ok ( ( ) )
99106}
100107
@@ -107,6 +114,7 @@ pub struct OsedaConfig {
107114 // effectively mutable. Will get updated on each deployment
108115 pub last_updated : DateTime < Utc > ,
109116 pub color : String ,
117+ // description must not be empty for check/deploy
110118 pub description : String
111119}
112120
@@ -281,7 +289,7 @@ mod test {
281289 tags : vec ! [ Tag :: ComputerScience ] ,
282290 last_updated : chrono:: Utc :: now ( ) ,
283291 color : Color :: Black . into_hex ( ) ,
284- description : String :: new ( ) ,
292+ description : String :: from ( "Test Description" ) ,
285293 } ;
286294
287295 let fake_dir = Path :: new ( "/tmp/my-project" ) ;
@@ -299,7 +307,7 @@ mod test {
299307 tags : vec ! [ Tag :: ComputerScience ] ,
300308 last_updated : chrono:: Utc :: now ( ) ,
301309 color : Color :: Black . into_hex ( ) ,
302- description : String :: new ( ) ,
310+ description : String :: from ( "Test Description" ) ,
303311 } ;
304312
305313 let fake_dir = Path :: new ( "/tmp/oseda" ) ;
@@ -337,7 +345,7 @@ mod test {
337345 tags : vec ! [ Tag :: ComputerScience ] ,
338346 last_updated : chrono:: Utc :: now ( ) ,
339347 color : Color :: Black . into_hex ( ) ,
340- description : String :: new ( ) ,
348+ description : String :: from ( "Test Description" ) ,
341349 } ;
342350
343351 let fake_dir = Path :: new ( "/tmp/oseda" ) ;
0 commit comments