diff options
author | 2008-06-07 18:20:42 +0000 | |
---|---|---|
committer | 2008-06-07 18:20:42 +0000 | |
commit | a3d318749fcecae2465d48e55e0bfd6da3fff78a (patch) | |
tree | b544ffbb66e6f52976783a90bf1150c788986621 | |
parent | Add setting for the buglist.cgi URL. (diff) | |
download | rbot-bugzilla-a3d318749fcecae2465d48e55e0bfd6da3fff78a.tar.gz rbot-bugzilla-a3d318749fcecae2465d48e55e0bfd6da3fff78a.tar.bz2 rbot-bugzilla-a3d318749fcecae2465d48e55e0bfd6da3fff78a.zip |
Wire up buglisturl for use in announcements.
-rw-r--r-- | bugzilla.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/bugzilla.rb b/bugzilla.rb index 49b74af..73e77b0 100644 --- a/bugzilla.rb +++ b/bugzilla.rb @@ -394,16 +394,15 @@ class BugzillaPlugin < Plugin def announce return unless @registry["zilla.#{@name}.announcements"] - buglist_url = baseurl + - "/buglist.cgi?ctype=csv&order=bugs.bug_id" + recent_url = buglisturl if lastseenid == nil - buglist_url += "&chfieldfrom=-6h&chfieldto=Now&chfield=%5BBug+creation%5D" + recent_url += "&chfieldfrom=-6h&chfieldto=Now&chfield=%5BBug+creation%5D" else - buglist_url += "&field0-0-0=bug_id&remaction=&type0-0-0=greaterthan&value0-0-0=#{lastseenid}" + recent_url += "&field0-0-0=bug_id&remaction=&type0-0-0=greaterthan&value0-0-0=#{lastseenid}" end - buglist = CSV::Reader.create(@bot.httputil.get(buglist_url)).to_a + buglist = CSV::Reader.create(@bot.httputil.get(recent_url)).to_a buglist.delete_at(0) upper_bound = [buglist.size, 5].min buglist[-upper_bound..-1].each do |bug| |