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

Respond to regex matches without directly being mentioned. #1375

Open
drobati opened this issue Mar 9, 2017 · 2 comments
Open

Respond to regex matches without directly being mentioned. #1375

drobati opened this issue Mar 9, 2017 · 2 comments

Comments

@drobati
Copy link

drobati commented Mar 9, 2017

Cog is great, but one use case that it can't handle is responding to matched patterns in all text in a channel.

For example check out https://github.com/github/hubot/blob/master/src/robot.coffee#L103.

A use case, perhaps the bot would print useful information from JIRA, Bugzilla, or some other issue tracker. It sees a pattern like s/BUG ([0-9]+)/, queries an API for that bug number, then outputs helpful information.

With cog's bundling, I believe you could have the query portion written in whatever language, run as a relay. And have a listen object instead of command object, with its own permissions system. This way you could also utilize the template system.

This would eliminate the need for other bots in my stack, AND would actually give me a permissions system as hubot doesn't have great control for channels/users/groups.

@jesselang
Copy link

This is a much needed feature. Creating bundles that can inject information based on keywords is an important feature. I was rather surprised that this doesn't yet exist in cog. Perhaps there's a way to leverage the existing work with triggers, and add listeners that can execute a trigger.

Thanks for all the hard work with cog!

@nmohoric
Copy link
Member

I'm imagining a separate type of (ie, instead of being listed under commands in the config, they'd be something likst listeners).

This seems like a good idea, although I'm not familiar enough with the codebase yet to know how much work it will be. I think we should figure out what the priority of this is in relation to other things we'd like to work on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants