Skip to content

Commit

Permalink
Bug 1749747 - Don't allow commit messages starting with WIP. r=sheehan
Browse files Browse the repository at this point in the history
Differential Revision: https://phabricator.services.mozilla.com/D135712

--HG--
extra : moz-landing-system : lando
  • Loading branch information
evilpie committed Jan 12, 2022
1 parent 62b0927 commit 4d976e8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hghooks/mozhghooks/commit-message.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,15 @@ def message(fmt):
b"'r=' instead.")
return False

desc_lower = desc.lower()
if desc_lower.startswith(b'wip:'):
message(b"Rev %(rev)s seems to be marked as WIP.")
return False

for r in goodMessage:
if r.search(firstline):
return True

desc_lower = desc.lower()
if desc_lower.startswith((b'merge', b'merging', b'automated merge')):
if len(c.parents()) == 2:
return True
Expand Down

0 comments on commit 4d976e8

Please sign in to comment.