Skip to content

Commit

Permalink
Bug 1453760 - Fix commenter's check_needswork_owner() (#3874)
Browse files Browse the repository at this point in the history
change logic so that it always updates whiteboard status,
unless whiteboard_needswork_owner already exists.
  • Loading branch information
sarah-clements authored and edmorley committed Aug 2, 2018
1 parent c783f47 commit 8560678
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions treeherder/intermittents_commenter/commenter.py
Expand Up @@ -141,15 +141,17 @@ def check_needswork_owner(self, change_priority, bug_info, whiteboard):
change_priority = '--'

stockwell_text = re.search(r'\[stockwell (.+?)\]', whiteboard)
if stockwell_text is not None and stockwell_text.group() != WHITEBOARD_NEEDSWORK_OWNER:
# update whiteboard text unless it already contains WHITEBOARD_NEEDSWORK_OWNER
if stockwell_text is None or stockwell_text.group() != WHITEBOARD_NEEDSWORK_OWNER:
whiteboard = self.update_whiteboard(whiteboard, WHITEBOARD_NEEDSWORK_OWNER)

return change_priority, whiteboard

def check_needswork(self, whiteboard):
if whiteboard is not None:
stockwell_text = re.search(r'\[stockwell (.+?)\]', whiteboard)
# covers all 'needswork' possibilities, ie 'needswork:owner'
# update all [stockwell needswork] bugs (including all 'needswork' possibilities,
# ie 'needswork:owner') and update whiteboard to [stockwell unknown]
if stockwell_text is not None and stockwell_text.group(1).split(':')[0] == 'needswork':
whiteboard = self.update_whiteboard(whiteboard, '[stockwell unknown]')

Expand Down

0 comments on commit 8560678

Please sign in to comment.