summaryrefslogtreecommitdiffstats
path: root/modules/bugs.py
diff options
context:
space:
mode:
authorYaakov Nemoy <loupgaroublond@gmail.com>2008-09-28 10:29:00 -0400
committerYaakov M. Nemoy <loupgaroublond@gmail.com>2008-09-28 10:29:00 -0400
commitd491ac3a2199cb1f3cdcd4f2f6b3d877b3a65a65 (patch)
tree9940bed9d7c8edd1d416659f23b5c56c929ef8c9 /modules/bugs.py
parent40119a669a625b839503d91aa5d40e112f7e46e2 (diff)
downloadfedora-devshell-d491ac3a2199cb1f3cdcd4f2f6b3d877b3a65a65.tar.gz
fedora-devshell-d491ac3a2199cb1f3cdcd4f2f6b3d877b3a65a65.tar.xz
fedora-devshell-d491ac3a2199cb1f3cdcd4f2f6b3d877b3a65a65.zip
Make the shell functions a bit more modular for scripting
Diffstat (limited to 'modules/bugs.py')
-rw-r--r--modules/bugs.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/modules/bugs.py b/modules/bugs.py
new file mode 100644
index 0000000..359a06e
--- /dev/null
+++ b/modules/bugs.py
@@ -0,0 +1,24 @@
+import os
+
+class Bugs:
+ """
+ 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)
+