Skip to content

Commit 35cfa28

Browse files
committed
Do not allow bors try after it has been bors r+'ed. Fix #3.
1 parent 9ca78fc commit 35cfa28

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

homu/main.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,14 @@ def parse_commands(body, username, repo_cfg, state, my_username, db, states,
642642
elif word in ['try', 'try-'] and realtime:
643643
if not _try_auth_verified():
644644
continue
645+
if state.status == '' and state.approved_by:
646+
state.add_comment(
647+
':no_good: '
648+
'Please do not `try` after a pull request has been `r+`ed.'
649+
' If you need to `try`, unapprove (`r-`) it first.'
650+
)
651+
continue
652+
645653
state.try_ = word == 'try'
646654

647655
state.merge_sha = ''

0 commit comments

Comments
 (0)