mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
Made replies all one message
This commit is contained in:
parent
cd4270942d
commit
0c96bf73a7
@ -49,6 +49,7 @@ import utils
|
|||||||
import plugins
|
import plugins
|
||||||
import privmsgs
|
import privmsgs
|
||||||
import callbacks
|
import callbacks
|
||||||
|
import ircutils
|
||||||
|
|
||||||
dbfilename = os.path.join(conf.dataDir, 'Bugzilla.db')
|
dbfilename = os.path.join(conf.dataDir, 'Bugzilla.db')
|
||||||
def makeDb(filename):
|
def makeDb(filename):
|
||||||
@ -221,9 +222,7 @@ class Bugzilla(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
report['url'] = str('%s/show_bug.cgi?id=%s' % (match.group(1), match.group(2)))
|
report['url'] = str('%s/show_bug.cgi?id=%s' % (match.group(1), match.group(2)))
|
||||||
report['title'] = str(summary['title'])
|
report['title'] = str(summary['title'])
|
||||||
report['summary'] = str(self._mk_summary_string(summary))
|
report['summary'] = str(self._mk_summary_string(summary))
|
||||||
irc.reply(msg, '%(zilla)s bug #%(id)s: %(title)s' % report)
|
irc.reply(msg, '%(zilla)s bug #%(id)s: %(title)s %(summary)s %(url)s' % report)
|
||||||
irc.reply(msg, ' %(summary)s' % report)
|
|
||||||
irc.reply(msg, ' %(url)s' % report)
|
|
||||||
|
|
||||||
def bug(self, irc, msg, args):
|
def bug(self, irc, msg, args):
|
||||||
"""bug shorthand number
|
"""bug shorthand number
|
||||||
@ -259,25 +258,23 @@ class Bugzilla(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
report['url'] = str('%s/show_bug.cgi?id=%s' % (url, num))
|
report['url'] = str('%s/show_bug.cgi?id=%s' % (url, num))
|
||||||
report['title'] = str(summary['title'])
|
report['title'] = str(summary['title'])
|
||||||
report['summary'] = str(self._mk_summary_string(summary))
|
report['summary'] = str(self._mk_summary_string(summary))
|
||||||
irc.reply(msg, '%(zilla)s bug #%(id)s: %(title)s' % report)
|
irc.reply(msg, '%(zilla)s bug #%(id)s: %(title)s %(summary)s %(url)s' % report)
|
||||||
irc.reply(msg, ' %(summary)s' % report)
|
|
||||||
irc.reply(msg, ' %(url)s' % report)
|
|
||||||
return
|
return
|
||||||
|
|
||||||
def _mk_summary_string(self, summary):
|
def _mk_summary_string(self, summary):
|
||||||
ary = []
|
ary = []
|
||||||
if summary.has_key('component'):
|
if summary.has_key('component'):
|
||||||
ary.append('Component: %s' % summary['component'])
|
ary.append(ircutils.bold('Component: ') + summary['component'])
|
||||||
if summary.has_key('severity'):
|
if summary.has_key('severity'):
|
||||||
ary.append('Severity: %s' % summary['severity'])
|
ary.append(ircutils.bold('Severity: ') + summary['severity'])
|
||||||
if summary.has_key('assigned to'):
|
if summary.has_key('assigned to'):
|
||||||
ary.append('Assigned to: %s' % summary['assigned to'])
|
ary.append(ircutils.bold('Assigned to: ') + summary['assigned to'])
|
||||||
if summary.has_key('status'):
|
if summary.has_key('status'):
|
||||||
if summary.has_key('resolution'):
|
if summary.has_key('resolution'):
|
||||||
ary.append('Status: %s/%s' %
|
ary.append(ircutils.bold('Status: ') + '%s/%s' %
|
||||||
(summary['status'], summary['resolution']))
|
(summary['status'], summary['resolution']))
|
||||||
else:
|
else:
|
||||||
ary.append('Status: %s' % summary['status'])
|
ary.append(ircutils.bold('Status: ') + summary['status'])
|
||||||
out = string.join(ary, ', ')
|
out = string.join(ary, ', ')
|
||||||
return out
|
return out
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user