Skip to content

Commit

Permalink
Remove Jira issue responder (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
NotMyFault authored Feb 20, 2023
1 parent fa99824 commit ebb09c9
Showing 1 changed file with 0 additions and 39 deletions.
39 changes: 0 additions & 39 deletions src/main/java/org/jenkinsci/backend/ircbot/IrcListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ public void onMessage(MessageEvent e) {
String payload = message.substring(directMessagePrefix.length()).trim();
payload = payload.replaceAll("\\s+", " ");
handleDirectCommand(channel, sender, payload);
} else { // Just a commmon message in the chat
replyBugStatuses(channel, message);
}
} catch (RuntimeException ex) { // Catch unhandled runtime issues
ex.printStackTrace();
Expand All @@ -120,43 +118,6 @@ public void onMessage(MessageEvent e) {
}
}

private void replyBugStatuses(Channel channel, String message) {
Matcher m = Pattern.compile("(?:hudson-|jenkins-|bug )([0-9]{2,})",CASE_INSENSITIVE).matcher(message);
while (m.find()) {
replyBugStatus(channel,"JENKINS-"+m.group(1));
}

m = Pattern.compile("(?:infra-)([0-9]+)",CASE_INSENSITIVE).matcher(message);
while (m.find()) {
replyBugStatus(channel,"INFRA-"+m.group(1));
}

m = Pattern.compile("(?:website-)([0-9]+)",CASE_INSENSITIVE).matcher(message);
while (m.find()) {
replyBugStatus(channel,"WEBSITE-"+m.group(1));
}

m = Pattern.compile("(?:hosting-)([0-9]+)",CASE_INSENSITIVE).matcher(message);
while (m.find()) {
replyBugStatus(channel,"HOSTING-"+m.group(1));
}

m = Pattern.compile("(?:events-)([0-9]+)",CASE_INSENSITIVE).matcher(message);
while (m.find()) {
replyBugStatus(channel,"EVENTS-"+m.group(1));
}

m = Pattern.compile("(?:ux-)([0-9]+)",CASE_INSENSITIVE).matcher(message);
while (m.find()) {
replyBugStatus(channel,"UX-"+m.group(1));
}

m = Pattern.compile("(?:test-)([0-9]+)",CASE_INSENSITIVE).matcher(message);
while (m.find()) {
replyBugStatus(channel,"TEST-"+m.group(1));
}
}

/**
* Handles direct commands coming to the bot.
* The handler presumes the external trimming of the payload.
Expand Down

0 comments on commit ebb09c9

Please sign in to comment.