Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1382)

Unified Diff: media/tools/bug_hunter/bug_hunter.py

Issue 9452025: Adding Milestone in chromium bug hunter output file and email. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: change year in the header Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/tools/bug_hunter/bug_hunter_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/tools/bug_hunter/bug_hunter.py
diff --git a/media/tools/bug_hunter/bug_hunter.py b/media/tools/bug_hunter/bug_hunter.py
index 96a4289a3dde8597009658aa49c604296e553395..19a2f8f75f800866317e86b604782dbb7524e668 100644
--- a/media/tools/bug_hunter/bug_hunter.py
+++ b/media/tools/bug_hunter/bug_hunter.py
@@ -1,5 +1,5 @@
#!/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
# found in the LICENSE file.
@@ -86,7 +86,8 @@ _INTERVAL_UNIT_CHOICES = ('hours', 'days', 'weeks')
_URL_EXCLUSION_LIST = ('http://www.youtube.com/html5',
'http://www.google.com')
_ISSUE_ELEMENT_IN_EMAIL_CHOICES = ('issue_id', 'author', 'status', 'state',
- 'content', 'comments', 'labels', 'urls')
+ 'content', 'comments', 'labels', 'urls',
+ 'mstone')
def ParseArgs():
@@ -246,12 +247,19 @@ class BugHunter(object):
set(re.findall(r'(https?://\S+)', content + comments)))
url_list = [url for url in url_list
if not url.rstrip('/') in _URL_EXCLUSION_LIST]
- issues.append({'issue_id': issue_id, 'title': entry.title.text,
- 'author': entry.author[0].name.text,
- 'status': entry.status.text,
- 'state': entry.state.text, 'content': content,
- 'comments': comments, 'labels': label_list,
- 'urls': url_list})
+ mstone = ''
+ r = re.compile(r'Mstone-(\d*)')
+ for label in label_list:
+ m = r.search(label)
+ if m:
+ 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)
def _SetUpEmailSubjectMsg(self, issues):
« no previous file with comments | « no previous file | media/tools/bug_hunter/bug_hunter_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698