Skip to content

Commit 486cbf8

Browse files
committed
Add "[DO NOT MERGE]" to the list of WIP keywords.
1 parent 35cfa28 commit 486cbf8

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

homu/main.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -488,11 +488,20 @@ def parse_commands(body, username, repo_cfg, state, my_username, db, states,
488488
continue
489489

490490
# Ignore WIP PRs
491-
if any(map(state.title.startswith, [
492-
'WIP', 'TODO', '[WIP]', '[TODO]',
493-
])):
494-
if realtime:
495-
state.add_comment(':clipboard: Looks like this PR is still in progress, ignoring approval') # noqa
491+
is_wip = False
492+
for wip_kw in ['WIP', 'TODO', '[WIP]', '[TODO]', '[DO NOT MERGE]']:
493+
if state.title.upper().startswith(wip_kw):
494+
if realtime:
495+
state.add_comment((
496+
':clipboard:'
497+
' Looks like this PR is still in progress,'
498+
' ignoring approval.\n\n'
499+
'Hint: Remove **{}** from this PR\'s title when'
500+
' it is ready for review.'
501+
).format(wip_kw))
502+
is_wip = True
503+
break
504+
if is_wip:
496505
continue
497506

498507
# Sometimes, GitHub sends the head SHA of a PR as 0000000

0 commit comments

Comments
 (0)