aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bugzilla.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/bugzilla.rb b/bugzilla.rb
index 2971939..7397ddb 100644
--- a/bugzilla.rb
+++ b/bugzilla.rb
@@ -42,6 +42,7 @@ OPEN_STATUS = ['OPEN','UNCONFIRMED','NEW','ASSIGNED','REOPENED']
VALID_RESO = ['FIXED', 'INVALID', 'WONTFIX', 'LATER', 'REMIND', 'DUPLICATE', 'WORKSFORME', 'CANTFIX', 'NEEDINFO', 'TEST-REQUEST', 'UPSTREAM']
# Each zilla instance may have these parameters
+# TODO: Add 'nicename' that is used for output to IRC. Defaults to name.capitialize
OPTIONS = [ 'name', 'baseurl', 'dataurl', 'showbugurl', 'reporturl' ]
# Now life gets fun, these are regular expresses to check the above arrays
@@ -289,6 +290,8 @@ class BugzillaPlugin < Plugin
@client = nil
end
+ # TODO: Promote EMAIL_REPLACEMENTS to a config hash instead, with a nice
+ # large set of defaults.
EMAIL_REPLACEMENTS = { 'gentoo.org' => 'g.o', 'gentooexperimental.org' => 'ge.org' }
def shrink_email(email)
domain = email.split(/@/)[1]
@@ -320,6 +323,7 @@ class BugzillaPlugin < Plugin
end
bug_error = bugxml.attribute("error").to_s
if bug_error.length > 0
+ # TODO: Create Exception classes for other error modes.
case bug_error.downcase
when "notpermitted"
raise ENotPermitted.new(name, bugno)
@@ -346,6 +350,7 @@ class BugzillaPlugin < Plugin
assignee = bugxml.get_text("assigned_to").to_s
assignee = shrink_email(assignee)
+ # TODO: summary output templatable
return "" +
"Bug #{bugno}; " +
"\"#{desc}\"; " +
@@ -824,6 +829,7 @@ class BugzillaPlugin < Plugin
end
# Unsets the default zilla for the given channel regexp
+ # TODO: This is broken
def channel_defaults_unset(m, params)
begin
@registry["channel_defaults"].delete(params[:channel])
@@ -927,6 +933,8 @@ class BugzillaPlugin < Plugin
"zilla default list" => "zilla default list : shows all channels for which a default is set",
"zilla default show" => "zilla default show #{Bold}channel_name#{Bold} : show the default for a given channel",
+ # TODO: Document the announcement stuff
+
"zilla source" => "zilla source : shows a link to the plugin's sources.",
"zilla credits" => "zilla credits : shows the plugin's credits and license."
}