File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,8 @@ impl TargetMatrix {
75
75
_ => ( vec ! [ ] , TargetMatrixArgs :: default ( ) ) ,
76
76
} ;
77
77
78
+ // only apply ci labels on prs and `/ci try`,
79
+ // if the try command is not the default, we don't want to apply ci labels
78
80
if matches ! (
79
81
self ,
80
82
Self {
@@ -362,26 +364,27 @@ impl TargetMatrixArgs {
362
364
map. end ( )
363
365
}
364
366
}
365
- let tests = match (
367
+ let mut tests = match (
366
368
self . tests . iter ( ) . any ( |t| t == "all" ) ,
367
369
self . tests . iter ( ) . any ( |t| t == "none" ) ,
368
370
) {
369
371
( _, true ) => vec ! [ ] ,
370
372
( true , false ) => {
371
- let mut possible: Vec < String > = Self :: command ( )
373
+ let possible: Vec < String > = Self :: command ( )
372
374
. get_arguments ( )
373
375
. find ( |arg| arg. get_id ( ) == "tests" )
374
376
. expect ( "a `tests` argument should exist" )
375
377
. get_possible_values ( )
376
378
. into_iter ( )
377
379
. map ( |p| p. get_name ( ) . to_owned ( ) )
378
380
. collect ( ) ;
379
- possible. retain ( |p| p != "all" ) ;
380
- possible. retain ( |p| p != "none" ) ;
381
+
381
382
possible
382
383
}
383
384
_ => self . tests . clone ( ) ,
384
385
} ;
386
+ tests. retain ( |p| p != "all" ) ;
387
+ tests. retain ( |p| p != "none" ) ;
385
388
serde_json:: to_value ( Ser ( tests) )
386
389
}
387
390
}
You can’t perform that action at this time.
0 commit comments