Commit 07b7d6b7 authored by imasaki@google.com's avatar imasaki@google.com

Adding Milestone in chromium bug hunter output file and email. Also, fix some...

Adding Milestone in chromium bug hunter output file and email. Also, fix some minor issues relating to empty status.

BUG=115503
TEST= locally executed the scripts and made sure it is working as intended.

Review URL: https://chromiumcodereview.appspot.com/9452025

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124468 0039d316-1c4b-4281-b951-d872f2087c98
parent 254ec910
#!/usr/bin/env python #!/usr/bin/env python
# Copyright (c) 2011 The Chromium Authors. All rights reserved. # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
...@@ -86,7 +86,8 @@ _INTERVAL_UNIT_CHOICES = ('hours', 'days', 'weeks') ...@@ -86,7 +86,8 @@ _INTERVAL_UNIT_CHOICES = ('hours', 'days', 'weeks')
_URL_EXCLUSION_LIST = ('http://www.youtube.com/html5', _URL_EXCLUSION_LIST = ('http://www.youtube.com/html5',
'http://www.google.com') 'http://www.google.com')
_ISSUE_ELEMENT_IN_EMAIL_CHOICES = ('issue_id', 'author', 'status', 'state', _ISSUE_ELEMENT_IN_EMAIL_CHOICES = ('issue_id', 'author', 'status', 'state',
'content', 'comments', 'labels', 'urls') 'content', 'comments', 'labels', 'urls',
'mstone')
def ParseArgs(): def ParseArgs():
...@@ -246,12 +247,19 @@ class BugHunter(object): ...@@ -246,12 +247,19 @@ class BugHunter(object):
set(re.findall(r'(https?://\S+)', content + comments))) set(re.findall(r'(https?://\S+)', content + comments)))
url_list = [url for url in url_list url_list = [url for url in url_list
if not url.rstrip('/') in _URL_EXCLUSION_LIST] if not url.rstrip('/') in _URL_EXCLUSION_LIST]
issues.append({'issue_id': issue_id, 'title': entry.title.text, mstone = ''
'author': entry.author[0].name.text, r = re.compile(r'Mstone-(\d*)')
'status': entry.status.text, for label in label_list:
'state': entry.state.text, 'content': content, m = r.search(label)
'comments': comments, 'labels': label_list, if m:
'urls': url_list}) mstone = m.group(1)
issues.append(
{'issue_id': issue_id, 'title': entry.title.text,
'author': entry.author[0].name.text,
'status': entry.status.text if entry.status is not None else '',
'state': entry.state.text if entry.state is not None else '',
'content': content, 'mstone': mstone, 'comments': comments,
'labels': label_list, 'urls': url_list})
return sorted(issues, key=itemgetter('issue_id'), reverse=True) return sorted(issues, key=itemgetter('issue_id'), reverse=True)
def _SetUpEmailSubjectMsg(self, issues): def _SetUpEmailSubjectMsg(self, issues):
......
#!/usr/bin/env python #!/usr/bin/env python
# Copyright (c) 2011 The Chromium Authors. All rights reserved. # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
......
#!/usr/bin/env python #!/usr/bin/env python
# Copyright (c) 2011 The Chromium Authors. All rights reserved. # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment