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

Remove weird parsing bit that kills Regex routes. #23

Closed
wants to merge 1 commit into from

Conversation

zachfeldman
Copy link

If I leave this in, none of my regex "match" routes seem to work. Any ideas?

@dblock
Copy link
Collaborator

dblock commented Oct 28, 2015

It's not that weird. It supports matching the bot name and aliases. Why don't you explain the bug that you're seeing, and, better, write a failing test for it? Happy to help fix.

@zachfeldman
Copy link
Author

Sure, the bug I'm seeing is when I try to use a custom matcher rather than the command syntax (match, etc).

It seems that using the existing "parser" function, the regex matching fails because the bot name is prepended to my command before it's checked against the regex.

I don't really have time to write a failing test but just thought I'd bring this to your attention! My fork is working fine for me. Good luck!

@dblock
Copy link
Collaborator

dblock commented Oct 28, 2015

Can you provide an example of the custom matcher?

@zachfeldman
Copy link
Author

Sure, here's the whole bot:
https://github.com/zachfeldman/done-bot

@dblock dblock closed this in a0d61f9 Oct 29, 2015
@dblock
Copy link
Collaborator

dblock commented Oct 29, 2015

@zachfeldman Would you please try HEAD without this change? Turns out I didn't even have match specs, so now that's corrected and the parser is a little smarter. The goal for the non-regex version is to support addressing the bot, it's hacky at best, but with my fix it works in all scenarios looks like.

@zachfeldman
Copy link
Author

HEAD works!!

@dblock
Copy link
Collaborator

dblock commented Oct 29, 2015

I released 0.4.5. Thanks for bringing this up.

@zachfeldman
Copy link
Author

Sweet! Thanks for making such a sweet client to make this easier :)

@dblock
Copy link
Collaborator

dblock commented Oct 29, 2015

👍

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

Successfully merging this pull request may close these issues.

2 participants