aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2024-02-09 21:30:18 -0800
committerRobin H. Johnson <robbat2@gentoo.org>2024-02-09 21:30:18 -0800
commit18a4ab9ac73695a7e55bc4b17b428967629f5104 (patch)
treeb3249cf373b9c1353add04c3833736edcae95954
parentfeat: report how many bugs get skipped and make it configurable (diff)
downloadrbot-bugzilla-18a4ab9ac73695a7e55bc4b17b428967629f5104.tar.gz
rbot-bugzilla-18a4ab9ac73695a7e55bc4b17b428967629f5104.tar.bz2
rbot-bugzilla-18a4ab9ac73695a7e55bc4b17b428967629f5104.zip
fix: cannot compare string and int
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rw-r--r--bugzilla.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/bugzilla.rb b/bugzilla.rb
index ed23915..5000e4a 100644
--- a/bugzilla.rb
+++ b/bugzilla.rb
@@ -214,7 +214,7 @@ class BugzillaPlugin < Plugin
end
def max_announce
- @registry["zilla.#{name}.max_announce"] || 5
+ @registry["zilla.#{name}.max_announce"]&.to_i || 5
end
def max_announce=(val)
@@ -429,7 +429,7 @@ class BugzillaPlugin < Plugin
buglist = search(recent_url)
buglist.delete_at(0)
- upper_bound = [buglist.size, max_announce].min
+ upper_bound = [buglist.size, max_announce&.to_i].min
if (buglist.size > upper_bound)
first_skip = buglist[0][0].to_i