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

Random response when multiple rules have same trigger #63

Open
JordanSussman opened this issue Oct 8, 2018 · 3 comments
Open

Random response when multiple rules have same trigger #63

JordanSussman opened this issue Oct 8, 2018 · 3 comments
Labels
bug Something isn't working

Comments

@JordanSussman
Copy link
Collaborator

Report

What did you do?

Added multiple rules with different file names, but had the same respond keyword.

What did you expect to happen?

Warn that you have multiple rules with the same respond.

What happened instead?

Rules are randomly triggered without notification to the bot.

@JordanSussman JordanSussman added the bug Something isn't working label Oct 8, 2018
@mackenziegrimes
Copy link

Extension of this issue: support multiple rules.

Could we just allow multiple rules to match on the same input and both run on the input?

Ideally, we could also support a flag in the .yml config file that allows or disables this feature for a given rule, something like allow_other_rules or ignore_all_other_rules or continue_matching_after_execution.

@wass3r
Copy link
Collaborator

wass3r commented Jul 3, 2020

yea, i think it's that or go the other way.. print a warning that it detected duplicate rule names and execute neither.

@wass3r
Copy link
Collaborator

wass3r commented Jul 22, 2021

How about this?

By default, we don't stop finding matches after one is found. That means, if there are multiple rules matched, they will all execute. (basically what @mackenziegrimes was saying).

In addition, we add something like enforce_unique_trigger: <bool> (false by default) at the global level. For community managed bots where multiple people can manage rules, it might help prevent accidental overlap? we'd just run a validator first or something.

@wass3r wass3r moved this to To do in flottbot Sep 10, 2022
@wass3r wass3r added this to flottbot Sep 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: To do
Development

No branches or pull requests

3 participants