File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed
Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -508,13 +508,25 @@ async fn handle_comment(
508508 . await
509509 }
510510 BorsCommand :: Pause => {
511- tracing:: info!( "Pausing {}" , repo. repository( ) ) ;
512- repo. set_paused ( true ) ;
511+ if repo
512+ . permissions
513+ . load ( )
514+ . has_permission ( comment. author . id , PermissionType :: Review )
515+ {
516+ tracing:: info!( "Pausing {}" , repo. repository( ) ) ;
517+ repo. set_paused ( true ) ;
518+ }
513519 Ok ( ( ) )
514520 }
515521 BorsCommand :: Resume => {
516- tracing:: info!( "Resuming {}" , repo. repository( ) ) ;
517- repo. set_paused ( false ) ;
522+ if repo
523+ . permissions
524+ . load ( )
525+ . has_permission ( comment. author . id , PermissionType :: Review )
526+ {
527+ tracing:: info!( "Resuming {}" , repo. repository( ) ) ;
528+ repo. set_paused ( false ) ;
529+ }
518530 Ok ( ( ) )
519531 }
520532 } ;
You can’t perform that action at this time.
0 commit comments