ubuntu-bots/Bugtracker/config.py

76 lines
3.0 KiB
Python
Raw Normal View History

2006-06-26 17:57:20 +00:00
###
# Copyright (c) 2005-2007 Dennis Kaarsemaker
2006-06-26 17:57:20 +00:00
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
###
import supybot.conf as conf
import supybot.registry as registry
import supybot.ircutils as ircutils
class Bugtrackers(registry.SpaceSeparatedListOfStrings):
List = ircutils.IrcSet
2006-06-26 17:57:20 +00:00
def configure(advanced):
from supybot.questions import expect, anything, something, yn
conf.registerPlugin('Bugtracker', True)
Bugtracker = conf.registerPlugin('Bugtracker')
conf.registerChannelValue(Bugtracker, 'bugSnarfer',
2006-06-26 17:57:20 +00:00
registry.Boolean(False, """Determines whether the bug snarfer will be
enabled, such that any Bugtracker URLs and bug ### seen in the channel
will have their information reported into the channel."""))
conf.registerChannelValue(conf.supybot.plugins.Bugtracker, 'bugReporter',
registry.String('', """Report new bugs (experimental)"""))
conf.registerChannelValue(Bugtracker, 'replyNoBugtracker',
2006-06-26 17:57:20 +00:00
registry.String('I don\'t have a bugtracker %s.', """Determines the phrase
to use when notifying the user that there is no information about that
bugtracker site."""))
conf.registerChannelValue(Bugtracker, 'snarfTarget',
2006-06-26 17:57:20 +00:00
registry.String('', """Determines the bugtracker to query when the
snarf command is triggered"""))
conf.registerGlobalValue(Bugtracker, 'bugtrackers',
2006-06-26 17:57:20 +00:00
Bugtrackers([], """Determines what bugtrackers will be added to the bot when it starts."""))
conf.registerGlobalValue(Bugtracker, 'replyWhenNotFound',
2006-06-26 17:57:20 +00:00
registry.Boolean(False, """Whether to send a message when a bug could not be
found"""))
conf.registerChannelValue(Bugtracker, 'repeatdelay',
2006-12-27 14:33:59 +00:00
registry.Integer(60, """Number of seconds to wait between repeated bug calls"""))
conf.registerChannelValue(Bugtracker, 'showassignee',
2007-09-17 19:00:51 +00:00
registry.Boolean(False, """Whether to show the assignee in bug reports"""))
conf.registerChannelValue(Bugtracker, 'extended',
registry.Boolean(False, "Show optional extneded bug information, specific to trackers"))
conf.registerGlobalValue(Bugtracker, 'reportercache',
registry.String('', """Name of the basedir for the bugreporter cache""", private=True))
conf.registerGlobalValue(Bugtracker, 'imap_server',
registry.String('', """IMAP server for bugmail account""",private=True))
conf.registerGlobalValue(Bugtracker, 'imap_user',
registry.String('', """IMAP user for bugmail account""", private=True))
conf.registerGlobalValue(Bugtracker, 'imap_password',
registry.String('', """IMAP password for bugmail account""", private=True))
conf.registerGlobalValue(Bugtracker, 'imap_ssl',
registry.Boolean(False, """Use SSL for imap connections""", private=True))