@@ -46,9 +46,9 @@ def environment_start(cfg: Config):
46
46
help = 'While updating, ensure at least PERCENT are healthy' , default = 75 , show_default = True )
47
47
@click .option ('--motd' , type = str , default = 'Site is being updated' ,
48
48
help = 'Set the message of the day used during refresh' , show_default = True )
49
- @click .option ('--no-notify' , type = bool )
49
+ @click .option ('--notify/-- no-notify' , help = 'Send GitHub notifications for newly released PRs' , default = True )
50
50
@click .pass_obj
51
- def environment_refresh (cfg : Config , min_healthy_percent : int , motd : str , no_notify : bool ):
51
+ def environment_refresh (cfg : Config , min_healthy_percent : int , motd : str , notify : bool ):
52
52
"""Refreshes an environment.
53
53
54
54
This replaces all the instances in the ASGs associated with an environment with
@@ -102,7 +102,7 @@ def environment_refresh(cfg: Config, min_healthy_percent: int, motd: str, no_not
102
102
last_log = log
103
103
if status in ('Successful' , 'Failed' , 'Cancelled' ):
104
104
break
105
- if cfg .env .value == cfg .env .PROD and not no_notify : # Double negation because I don't know how to make a default cli flag be True
105
+ if cfg .env .value == cfg .env .PROD and notify :
106
106
current_notify = get_current_notify ()
107
107
if current_notify is not None and current_release is not None :
108
108
gh_token = get_ssm_param ("/compiler-explorer/githubAuthToken" )
0 commit comments