mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-06-04 20:41:29 +00:00
finished porting hugdaylist from launchpadbugs to launchpadlib
This commit is contained in:
parent
7439db8d3b
commit
920971eaa7
24
hugdaylist
24
hugdaylist
@ -35,7 +35,7 @@ import string
|
|||||||
import sys
|
import sys
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
|
||||||
from common import get_launchpad, translate_web_api
|
from common import get_launchpad, translate_web_api, translate_api_web
|
||||||
|
|
||||||
def check_args():
|
def check_args():
|
||||||
howmany = -1
|
howmany = -1
|
||||||
@ -67,16 +67,19 @@ def check_args():
|
|||||||
|
|
||||||
return (howmany, url)
|
return (howmany, url)
|
||||||
|
|
||||||
def filter_unsolved(b):
|
def filter_unsolved(task):
|
||||||
bug = launchpad.bugs[int(b)]
|
# TODO: don't use this filter here, only check status and assignee of
|
||||||
|
# the given task
|
||||||
# Filter out special types of bugs:
|
# Filter out special types of bugs:
|
||||||
# - https://wiki.ubuntu.com/Bugs/HowToTriage#Special%20types%20of%20bugs
|
# - https://wiki.ubuntu.com/Bugs/HowToTriage#Special%20types%20of%20bugs
|
||||||
return filter(lambda a: a.status != 'Fix Committed' and \
|
subscriptions = set(s.person.name for s in task.bug.subscriptions) #this is expensive, parse name out of self_link instead?
|
||||||
(a.assignee in ['motu','desktop-bugs'] or \
|
if (task.status != "Fix Committed" and
|
||||||
not a.assignee), bug.infotable) and \
|
(not task.assignee or task.assignee.name in ['motu','desktop-bugs']) and
|
||||||
'ubuntu-main-sponsors' not in [str(s) for s in bug.subscribers] and \
|
'ubuntu-main-sponsors' not in subscriptions and
|
||||||
'ubuntu-universe-sponsors' not in [str(s) for s in bug.subscribers] and \
|
'ubuntu-universe-sponsors' not in subscriptions and
|
||||||
'ubuntu-archive' not in [str(s) for s in bug.subscribers]
|
'ubuntu-archive' not in subscriptions):
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
(howmany, url) = check_args()
|
(howmany, url) = check_args()
|
||||||
@ -116,8 +119,9 @@ def main():
|
|||||||
|| Bug || Subject || Triager ||"""
|
|| Bug || Subject || Triager ||"""
|
||||||
|
|
||||||
for i in list(l)[:howmany]:
|
for i in list(l)[:howmany]:
|
||||||
|
bug = i.bug
|
||||||
print '||<rowbgcolor="#FFEBBB"> [%s %s] || %s || ||' % \
|
print '||<rowbgcolor="#FFEBBB"> [%s %s] || %s || ||' % \
|
||||||
(i.url, i.bugnumber, i.summary)
|
(translate_api_web(bug.self_link), bug.id, bug.title)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user