Merge lp:~brian-murray/ubuntu-archive-tools/global-ignored-commenters into lp:ubuntu-archive-tools

Proposed by Brian Murray on 2012-11-14
Status: Merged
Merged at revision: 666
Proposed branch: lp:~brian-murray/ubuntu-archive-tools/global-ignored-commenters
Merge into: lp:ubuntu-archive-tools
Diff against target: 44 lines (+11/-9)
1 file modified
sru-report (+11/-9)
To merge this branch: bzr merge lp:~brian-murray/ubuntu-archive-tools/global-ignored-commenters
Reviewer Review Type Date Requested Status
Colin Watson 2012-11-14 Approve on 2012-11-14
Review via email: mp+134317@code.launchpad.net
To post a comment you must log in.
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sru-report'
2--- sru-report 2012-10-25 09:39:03 +0000
3+++ sru-report 2012-11-14 15:45:34 +0000
4@@ -252,13 +252,6 @@
5 else:
6 try:
7 bug = lp.bugs[b]
8- ignored_commenters = []
9- ubuntu_sru = lp.people['ubuntu-sru']
10- for participant in ubuntu_sru.participants:
11- ignored_commenters.append(participant)
12- ignored_commenters.append(lp.people['janitor'])
13- ignored_commenters.append(
14- lp.people['bug-watch-updater'])
15 last_message_date = bug.date_last_message.replace(
16 minute=0, second=0, microsecond=0)
17 published_date = rpkg['published'].replace(
18@@ -463,8 +456,8 @@
19
20
21 def lpinit():
22- '''Init LP credentials, archive and distro list'''
23- global lp, ubuntu, archive, releases
24+ '''Init LP credentials, archive, distro list and sru-team members'''
25+ global lp, ubuntu, archive, releases, ignored_commenters
26 logging.debug("Initializing LP Credentials")
27 lp = Launchpad.login_anonymously('sru-report', 'production')
28 ubuntu = lp.distributions['ubuntu']
29@@ -473,6 +466,15 @@
30 if s.active:
31 releases[s.name] = s
32 logging.debug('Active releases found: %s' % ' '.join(releases))
33+ # create a list of people for whom comments will be ignored when
34+ # displaying the last comment in the report
35+ ignored_commenters = []
36+ ubuntu_sru = lp.people['ubuntu-sru']
37+ for participant in ubuntu_sru.participants:
38+ ignored_commenters.append(participant)
39+ ignored_commenters.append(lp.people['janitor'])
40+ ignored_commenters.append(
41+ lp.people['bug-watch-updater'])
42
43
44 def get_queue_count(search_status, release, search_pocket):

Subscribers

People subscribed via source and target branches