File tree 2 files changed +15
-0
lines changed
2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ use std::str;
10
10
use std:: time:: { Duration , Instant } ;
11
11
12
12
const MINIMUM_DELAY_BETWEEN_INDEX_BACKUPS : Duration = Duration :: from_secs ( 60 * 60 ) ;
13
+ const SILENCE_LABEL : & str = "rla-silenced" ;
13
14
14
15
pub struct Worker {
15
16
debug_post : Option < ( String , u32 ) > ,
@@ -270,6 +271,14 @@ impl Worker {
270
271
info ! ( "Build results outdated, skipping report." ) ;
271
272
return Ok ( ( ) ) ;
272
273
}
274
+ if pr_info
275
+ . labels
276
+ . iter ( )
277
+ . any ( |label| label. name == SILENCE_LABEL )
278
+ {
279
+ info ! ( "PR has label `{SILENCE_LABEL}`, skipping report" ) ;
280
+ return Ok ( ( ) ) ;
281
+ }
273
282
}
274
283
275
284
let ( repo, pr) = match self . debug_post {
Original file line number Diff line number Diff line change @@ -61,13 +61,19 @@ pub struct CommitStatusEvent {
61
61
#[ derive( Deserialize ) ]
62
62
pub struct Pr {
63
63
pub head : PrCommitRef ,
64
+ pub labels : Vec < Label > ,
64
65
}
65
66
66
67
#[ derive( Deserialize ) ]
67
68
pub struct PrCommitRef {
68
69
pub sha : String ,
69
70
}
70
71
72
+ #[ derive( Deserialize ) ]
73
+ pub struct Label {
74
+ pub name : String ,
75
+ }
76
+
71
77
#[ derive( Deserialize ) ]
72
78
pub struct CommitMeta {
73
79
pub commit : Commit ,
You can’t perform that action at this time.
0 commit comments