Skip to content

Commit

Permalink
'Is reporter a Mozillian' as a feature mozilla#30
Browse files Browse the repository at this point in the history
  • Loading branch information
poojan124 committed Jan 21, 2019
1 parent fdb5488 commit 04f5144
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bugbug/bug_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ def __call__(self, bug):
return bug['component']


class is_mozillian(object):
def __call__(self, bug):
return any(bug['creator_detail']['email'].endswith(domain) for domain in ['@mozilla.com', '@mozilla.org'])


def cleanup_url(text):
text = re.sub(r'http[s]?://(hg.mozilla|searchfox|dxr.mozilla)\S+', '__CODE_REFERENCE_URL__', text)
return re.sub(r'http\S+', '__URL__', text)
Expand Down

0 comments on commit 04f5144

Please sign in to comment.