Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bot.java: add support for "commandPrefixRequired" toggle [JENKINS-17380, JENKINS-58927] #210

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

jimklimov
Copy link
Contributor

@jimklimov jimklimov commented Jan 22, 2024

As posted in https://issues.jenkins.io/browse/JENKINS-17380 and https://issues.jenkins.io/browse/JENKINS-58927 currently the IRC Bot allows interaction via private chats (admin to bot) as opposed to group channels; however this still requires using the command prefix or nickname prefix - which is cumbersome in an already individualized private chat.

The culprit was in the common instant-messaging-plugin, where it recognizes if the message is of interest to the bot, by requiring those prefixes.

A viable solution (also backwards-compatible for users who would continue to use the prefixes) is to have an option to not-require the prefix and just try using any received message, if the consumer plugin told this bot instance to do so (not default!)

After merging and releasing a plugin iteration with this change, there would be fixes applied to ircbot-plugin to use the new constructor API. => jenkinsci/ircbot-plugin#214

CC @Flowdalic : You may want to update jabber-plugin similarly?

Testing done

Currently dev-tested for API non-breakage using a local mvn install and using the snapshot version as the required dependency version in ircbot-plugin build area (where the consumer is updated to use the new toggle). IDEA recognizes both of the constructors.

Submitter checklist

Signed-off-by: Jim Klimov <jimklimov+jenkinsci@gmail.com>
@jimklimov jimklimov requested a review from a team as a code owner January 22, 2024 10:36
@jimklimov jimklimov merged commit 82b9ec6 into jenkinsci:master Jan 22, 2024
14 checks passed
@jimklimov jimklimov deleted the JENKINS-17380 branch January 22, 2024 11:08
@jimklimov jimklimov added the java Pull requests that update Java code label Jan 22, 2024
@jimklimov
Copy link
Contributor Author

jimklimov commented Jan 22, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement java Pull requests that update Java code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant