blob: 19dbb709e7129d704677c6bec764ce07f9f0d3ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
import os
from base.module import Module
class Bugs(Module):
"""
Interface for doing useful things with Bugs.
TODO: add support for arbitrary bug trackers!
python-bugzilla integration!
"""
def view(self, data):
"""
View a given bug number, or show all bugs for a given component
Example: bugs view #1234, bugs view nethack
"""
if data[0] == '#':
os.system('firefox "https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=%s"' % data[1:])
else:
os.system('firefox "https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=%s&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr&long_desc="' % data)
def search(self, text):
"""
Search bugzilla for a given keyword
"""
os.system('firefox "https://bugzilla.redhat.com/buglist.cgi?query_format=specific&order=bugs.bug_id&bug_status=__open__&product=&content=%s"' % text)
__all__ = ['Bugs']
|