aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2024-02-10 11:13:03 -0800
committerRobin H. Johnson <robbat2@gentoo.org>2024-02-10 11:13:03 -0800
commit0b0ca1a283eb592a08974ae7bb00d33a600a5ceb (patch)
treec1fdf1b8861cb0c98fccb12fa85264cdfaed6da4
parentfix: cannot compare string and int (diff)
downloadrbot-bugzilla-0b0ca1a283eb592a08974ae7bb00d33a600a5ceb.tar.gz
rbot-bugzilla-0b0ca1a283eb592a08974ae7bb00d33a600a5ceb.tar.bz2
rbot-bugzilla-0b0ca1a283eb592a08974ae7bb00d33a600a5ceb.zip
fix: variable naming error
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 5000e4a..a4d88f5 100644
--- a/bugzilla.rb
+++ b/bugzilla.rb
@@ -546,6 +546,7 @@ class BugzillaPlugin < Plugin
# This function is used to check if an user requested bug
# information inline in the text of a message rather than directly
# to the bot.
+ MESSAGE_RE = /\bbug(?:[[:space:]]*)(?:#?([0-9]+|#[-[:alnum:]~`!@#$%^&*()_+={}\]\[\\\/|:;\'"<>.?]{3,40}))(?:(?:#c| comment #?)([0-9]+))?/i
def listen(m)
return if m.address?
return unless lurk?(m)
@@ -565,8 +566,7 @@ class BugzillaPlugin < Plugin
# bug aliases can contain
# 0-9, a-z, A-Z
# and then every punctuation except ","
- message_re = /\bbug(?:[[:space:]]*)(?:#?([0-9]+|#[-[:alnum:]~`!@#$%^&*()_+={}\]\[\\\/|:;\'"<>.?]{3,40}))(?:(?:#c| comment #?)([0-9]+))?/i
- message.scan(message_re).each do |bug_comment|
+ m.scan(MESSAGE_RE).each do |bug_comment|
bugno = bug_comment[0]
comment = bug_comment[1] || ""
bugno.gsub!(/^#/,'')